API refactoring and new domain form fields.

This commit is contained in:
Antoine Nguyen
2020-10-21 19:20:23 +02:00
parent 00a112dbcb
commit ddbd7f6c19
4 changed files with 19 additions and 9 deletions
+10 -1
View File
@@ -13,6 +13,7 @@
:error-messages="formErrors['name']"
>
</v-text-field>
<v-select label="Type" :items="domainTypes" />
<v-text-field label="Quota"
v-model="domain.quota"
suffix="MB"
@@ -27,6 +28,13 @@
:error-messages="formErrors['default_mailbox_quota']"
>
</v-text-field>
<v-text-field label="Message sending limit"
v-model="domain.message_limit"
suffix="per day"
:error="formErrors['message_limit']"
:error-messages="formErrors['message_limit']"
>
</v-text-field>
<v-checkbox label="Enabled"
v-model="domain.enabled"
>
@@ -71,7 +79,8 @@ export default {
data () {
return {
formErrors: {},
domain: {}
domain: {},
domainTypes: ['Domain', 'Relay domain']
}
},
computed: {
+1 -1
View File
@@ -7,7 +7,7 @@ function setupAxios (token) {
}
function fetchUser (commit) {
return Vue.prototype.$axios.get('/accounts/me').then(resp => {
return Vue.prototype.$axios.get('/account/me').then(resp => {
commit('SET_AUTH_USER', { authUser: resp.data, isAuthenticated: true })
})
}