mirror of
https://github.com/ProjectSegfault/website
synced 2026-10-20 20:58:10 +05:30
aaaaa
This commit is contained in:
1 file changed
+3
-2
@@ -2,6 +2,7 @@ import type { Actions } from "./$types";
|
||||
import Joi from "joi";
|
||||
import { fail } from "@sveltejs/kit";
|
||||
import { db } from "$lib/server/db";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export const actions: Actions = {
|
||||
add: async ({ request, locals }) => {
|
||||
@@ -24,8 +25,8 @@ export const actions: Actions = {
|
||||
const data = {
|
||||
...Object.fromEntries(formData.entries()),
|
||||
created: now,
|
||||
createdAt: now,
|
||||
updatedAt: now
|
||||
createdAt: dayjs.unix(now).toISOString(),
|
||||
updatedAt: dayjs.unix(now).toISOString()
|
||||
};
|
||||
|
||||
await db.delete("*").from("Announcements");
|
||||
|
||||
Reference in new issue
Block a user