Remove duplicate getUserData call in moveCurrentLoginUserToFirstRow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -126,7 +126,6 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
|
|||||||
*/
|
*/
|
||||||
async moveCurrentLoginUserToFirstRow(fetchedUserList: User[]): Promise<User[]> {
|
async moveCurrentLoginUserToFirstRow(fetchedUserList: User[]): Promise<User[]> {
|
||||||
const loginStore = useLoginStore();
|
const loginStore = useLoginStore();
|
||||||
await loginStore.getUserData();
|
|
||||||
const loginUserData:User = loginStore.userData;
|
const loginUserData:User = loginStore.userData;
|
||||||
const foundLoginUserIndex = fetchedUserList.findIndex(user => user.username === loginUserData.username);
|
const foundLoginUserIndex = fetchedUserList.findIndex(user => user.username === loginUserData.username);
|
||||||
fetchedUserList.unshift(fetchedUserList.splice(foundLoginUserIndex, 1)[0]);
|
fetchedUserList.unshift(fetchedUserList.splice(foundLoginUserIndex, 1)[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user