Skip to content

Commit

Permalink
fix(#191): home admin for servers with 1 user not set as admin
Browse files Browse the repository at this point in the history
  • Loading branch information
RaunoT authored Jul 30, 2024
1 parent 82a2e62 commit 36fc043
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ export const authOptions: AuthOptions = {
const xmlData = await res.text()
const jsonData = await parseStringPromise(xmlData)
const data = jsonData.user.$
const { title, id, thumb, email, homeAdmin } = data
const { title, id, thumb, email, homeAdmin, homeSize } = data
const userData = {
id: id,
name: title,
email: email,
image: thumb,
isAdmin: homeAdmin === '1',
isAdmin: homeAdmin === '1' || homeSize === '1',
}
console.log('[AUTH] - User logged in with data:', userData)

Expand Down

0 comments on commit 36fc043

Please sign in to comment.