feat: finish migrating to new objectid naming
This commit is contained in:
@@ -77,7 +77,7 @@ export default defineEventHandler(async (h3) => {
|
||||
username: user.username,
|
||||
displayName: user.displayName ?? user.username,
|
||||
email: user.email,
|
||||
profilePicture: profilePictureId,
|
||||
profilePictureObjectId: profilePictureId,
|
||||
admin: invitation.isAdmin,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -127,8 +127,8 @@ class NewsManager {
|
||||
const article = await prisma.article.delete({
|
||||
where: { id },
|
||||
});
|
||||
if (article.image) {
|
||||
return await objectHandler.deleteAsSystem(article.image);
|
||||
if (article.imageObjectId) {
|
||||
return await objectHandler.deleteAsSystem(article.imageObjectId);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ export class OIDCManager {
|
||||
username,
|
||||
email: userinfo.email ?? "",
|
||||
displayName: userinfo.name ?? username,
|
||||
profilePicture: profilePictureId,
|
||||
profilePictureObjectId: profilePictureId,
|
||||
admin: isAdmin,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -16,7 +16,7 @@ export default defineNitroPlugin(async (_nitro) => {
|
||||
displayName: "System",
|
||||
username: "system",
|
||||
email: "system@drop",
|
||||
profilePicture: "",
|
||||
profilePictureObjectId: "",
|
||||
},
|
||||
update: {
|
||||
admin: true,
|
||||
|
||||
Reference in New Issue
Block a user