diff --git a/components/UserConfig.vue b/components/UserConfig.vue
index 482862a4..78ed879b 100644
--- a/components/UserConfig.vue
+++ b/components/UserConfig.vue
@@ -4,7 +4,7 @@
-
+
@@ -33,6 +33,7 @@
class="form-control"
id="userName"
v-model="configStore.configUser.username"
+ disabled
/>
@@ -185,7 +186,14 @@ function onChange(event: any) {
}
async function getUserConfig() {
- await fetch(`/api/user/${selected.value}`, {
+ let selectUser = configStore.currentUser
+
+ if (user.value.username) {
+ selectUser = user.value.username.toString()
+ } else if (selected.value) {
+ selectUser = selected.value
+ }
+ await fetch(`/api/user/${selectUser}`, {
method: 'GET',
headers: authStore.authHeader,
})
@@ -280,6 +288,8 @@ async function onSubmitUser() {
configStore.configUser.password = newPass.value
}
+ console.log('--configStore.configUser', configStore.configUser)
+
authStore.inspectToken()
const update = await configStore.setUserConfig(configStore.configUser)