supplant user migration
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
a8277a2473
commit
ca34bb1ad2
|
@ -1,6 +1,6 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import { api, jApi } from '@/boot/axios';
|
||||
import { api } from '@/boot/axios';
|
||||
import useNotify from '@/composables/useNotify.js';
|
||||
import { useAppStore } from '@/stores/app.js';
|
||||
|
||||
|
@ -263,8 +263,11 @@ export const useUserStore = defineStore('user', () => {
|
|||
};
|
||||
|
||||
const supplantUser = async supplantUser => {
|
||||
const json = await jApi.send('client/supplant', { supplantUser });
|
||||
token.value = json;
|
||||
const { data } = await api.post('VnUsers/supplantUser', {
|
||||
supplantUser
|
||||
});
|
||||
if (!data || !data.id) return;
|
||||
token.value = data.id;
|
||||
sessionStorage.setItem('supplantUser', supplantUser);
|
||||
await fetchUser('supplantedUser');
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue