mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-20 11:41:14 +10:00
feat: partial user platform support + statusMessage -> message
This commit is contained in:
@ -8,7 +8,7 @@ export default defineClientEventHandler(async (h3, { fetchUser }) => {
|
||||
if (!id)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "ID required in route params",
|
||||
message: "ID required in route params",
|
||||
});
|
||||
|
||||
// Fetch specific collection
|
||||
@ -17,14 +17,14 @@ export default defineClientEventHandler(async (h3, { fetchUser }) => {
|
||||
if (!collection)
|
||||
throw createError({
|
||||
statusCode: 404,
|
||||
statusMessage: "Collection not found",
|
||||
message: "Collection not found",
|
||||
});
|
||||
|
||||
// Verify user owns this collection
|
||||
if (collection.userId !== user.id)
|
||||
throw createError({
|
||||
statusCode: 403,
|
||||
statusMessage: "Not authorized to access this collection",
|
||||
message: "Not authorized to access this collection",
|
||||
});
|
||||
|
||||
return collection;
|
||||
|
||||
Reference in New Issue
Block a user