This commit is contained in:
2024-10-03 16:22:20 +09:00
parent e512da9a48
commit d865938430
62 changed files with 931 additions and 905 deletions

View File

@@ -40,7 +40,7 @@ const getArticleEventHandler = defineEventHandler(async (event: any) => {
database,
sql,
(rows) => {
return rows[0];
return rows[0] as ArticleInfo;
}
);
res = {
@@ -51,9 +51,10 @@ const getArticleEventHandler = defineEventHandler(async (event: any) => {
coverImagePath: entry.coverImagePath,
};
} catch (err: any) {
const error = err as Error;
throw createError({
statusCode: 500,
statusMessage: err.message,
statusMessage: error.message,
});
}