inline token metadata into the notification instead of just storing the ID
This commit is contained in:
parent
156c7e9543
commit
b62f6ca042
5 changed files with 16 additions and 37 deletions
|
|
@ -157,7 +157,8 @@ export type MiNotification = {
|
|||
id: string;
|
||||
createdAt: string;
|
||||
notifierId: MiUser['id'];
|
||||
tokenId: MiAccessToken['id'];
|
||||
permCount: number;
|
||||
rank: 'user' | 'mod' | 'admin' | null;
|
||||
} | {
|
||||
type: 'sharedAccessRevoked';
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -479,27 +479,14 @@ export const packedNotificationSchema = {
|
|||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
token: {
|
||||
type: 'object',
|
||||
optional: false, nullable: true,
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
permission: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
rank: {
|
||||
type: 'string',
|
||||
enum: ['admin', 'mod', 'user'],
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
},
|
||||
permCount: {
|
||||
type: 'number',
|
||||
optional: true, nullable: false,
|
||||
},
|
||||
rank: {
|
||||
type: 'string',
|
||||
enum: ['admin', 'mod', 'user'],
|
||||
optional: true, nullable: true,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue