Преглед изворни кода

Load categories and settings from backend

sbkwgh пре 8 година
родитељ
комит
cfdd08088c
2 измењених фајлова са 11 додато и 0 уклоњено
  1. 0 0
      npm-debug.log.214648163
  2. 11 0
      src/App.vue

+ 0 - 0
npm-debug.log.214648163


+ 11 - 0
src/App.vue

@@ -150,6 +150,17 @@
 				this.showAccountModal = false
 			},
 			signup () {}
+		},
+		created () {
+			this.axios.get('/api/v1/settings')
+				.then(res => {
+					this.$store.commit('setForumName', res.data.forumName)
+				})
+
+			this.axios.get('/api/v1/category')
+				.then(res => {
+					this.$store.commit('addCategories', res.data)
+				})
 		}
 	}
 </script>