mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 04:50:12 +02:00
add isAdmin to auth state
This commit is contained in:
@@ -7,7 +7,24 @@ const baseResponse = z.object({
|
||||
}),
|
||||
});
|
||||
|
||||
const authenticate = z.null();
|
||||
const authenticate = z.object({
|
||||
user: z.object({
|
||||
adminRoles: z.boolean(),
|
||||
commentRole: z.boolean(),
|
||||
coverArtRole: z.boolean(),
|
||||
downloadRole: z.boolean(),
|
||||
folder: z.string().array(),
|
||||
jukeboxRole: z.boolean(),
|
||||
playlistRole: z.boolean(),
|
||||
podcastRole: z.boolean(),
|
||||
scrobblingEnabled: z.boolean(),
|
||||
settingsRole: z.boolean(),
|
||||
shareRole: z.boolean(),
|
||||
streamRole: z.boolean(),
|
||||
uploadRole: z.boolean(),
|
||||
username: z.string(),
|
||||
}),
|
||||
});
|
||||
|
||||
const authenticateParameters = z.object({
|
||||
c: z.string(),
|
||||
@@ -16,6 +33,7 @@ const authenticateParameters = z.object({
|
||||
s: z.string().optional(),
|
||||
t: z.string().optional(),
|
||||
u: z.string(),
|
||||
username: z.string(),
|
||||
v: z.string(),
|
||||
});
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ export type QueueSong = Song & {
|
||||
export type ServerListItem = {
|
||||
features?: ServerFeatures;
|
||||
id: string;
|
||||
isAdmin?: boolean;
|
||||
musicFolderId?: string[];
|
||||
name: string;
|
||||
preferInstantMix?: boolean;
|
||||
@@ -237,6 +238,7 @@ export type Artist = {
|
||||
|
||||
export type AuthenticationResponse = {
|
||||
credential: string;
|
||||
isAdmin?: boolean;
|
||||
ndCredential?: string;
|
||||
userId: null | string;
|
||||
username: string;
|
||||
|
||||
Reference in New Issue
Block a user