mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 17:21:13 +10:00
feat: partial user platform support + statusMessage -> message
This commit is contained in:
@ -14,13 +14,13 @@ export default defineEventHandler(async (h3) => {
|
||||
const orderBy = query.order as "asc" | "desc";
|
||||
if (orderBy) {
|
||||
if (typeof orderBy !== "string" || !["asc", "desc"].includes(orderBy))
|
||||
throw createError({ statusCode: 400, statusMessage: "Invalid order" });
|
||||
throw createError({ statusCode: 400, message: "Invalid order" });
|
||||
}
|
||||
|
||||
const tags = query.tags as string[] | undefined;
|
||||
if (tags) {
|
||||
if (typeof tags !== "object" || !Array.isArray(tags))
|
||||
throw createError({ statusCode: 400, statusMessage: "Invalid tags" });
|
||||
throw createError({ statusCode: 400, message: "Invalid tags" });
|
||||
}
|
||||
|
||||
const options = {
|
||||
|
||||
Reference in New Issue
Block a user