mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Fix not working routes
This commit is contained in:
parent
f7abe06a60
commit
df939a6a7a
8 changed files with 146 additions and 69 deletions
|
|
@ -536,7 +536,12 @@ export const userRelations = relations(user, ({ many, one }) => ({
|
|||
relationshipSubjects: many(relationship, {
|
||||
relationName: "RelationshipToSubject",
|
||||
}),
|
||||
notifications: many(notification),
|
||||
notificationsMade: many(notification, {
|
||||
relationName: "NotificationToAccount",
|
||||
}),
|
||||
notificationsReceived: many(notification, {
|
||||
relationName: "NotificationToNotified",
|
||||
}),
|
||||
openIdAccounts: many(openIdAccount),
|
||||
flags: many(flag),
|
||||
modNotes: many(modNote),
|
||||
|
|
@ -637,6 +642,24 @@ export const statusRelations = relations(status, ({ many, one }) => ({
|
|||
reblogs: many(status, {
|
||||
relationName: "StatusToReblog",
|
||||
}),
|
||||
notifications: many(notification),
|
||||
}));
|
||||
|
||||
export const notificationRelations = relations(notification, ({ one }) => ({
|
||||
account: one(user, {
|
||||
fields: [notification.accountId],
|
||||
references: [user.id],
|
||||
relationName: "NotificationToAccount",
|
||||
}),
|
||||
notified: one(user, {
|
||||
fields: [notification.notifiedId],
|
||||
references: [user.id],
|
||||
relationName: "NotificationToNotified",
|
||||
}),
|
||||
status: one(status, {
|
||||
fields: [notification.statusId],
|
||||
references: [status.id],
|
||||
}),
|
||||
}));
|
||||
|
||||
export const likeRelations = relations(like, ({ one }) => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue