Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Mar 26, 2024
1 parent 170687b commit 50f2aff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/scenes/instance/SystemStatus/staffUsersLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export const staffUsersLogic = kea<staffUsersLogicType>([
actions.setStaffUsersToBeAdded([])
const newStaffUsers = await Promise.all(
staffUsersToBeAdded.map(
async (userUuid) =>
(await api.update(`api/users/${userUuid}`, { is_staff: true })) as UserType
async (userUuid) => await api.update<UserType>(`api/users/${userUuid}`, { is_staff: true })
)
)
const updatedAllUsers: UserType[] = [
Expand All @@ -45,7 +44,7 @@ export const staffUsersLogic = kea<staffUsersLogicType>([
return updatedAllUsers
},
deleteStaffUser: async ({ userUuid }) => {
await api.update(`api/users/${userUuid}`, { is_staff: false })
await api.update<UserType>(`api/users/${userUuid}`, { is_staff: false })
if (values.user?.uuid === userUuid) {
actions.loadUser() // Loads the main user object to properly reflect staff user changes
router.actions.push(urls.projectHomepage())
Expand Down

0 comments on commit 50f2aff

Please sign in to comment.