This commit is contained in:
2024-07-06 23:23:01 +02:00
parent 169ba29253
commit c9e7717130
39 changed files with 395 additions and 326 deletions
+12 -1
View File
@@ -1,6 +1,5 @@
"use server";
import { APIError, attemptAPIAction } from "@/util";
import {
sequelize,
Bucket,
@@ -20,6 +19,7 @@ import {
} from "@/app/lib/actions/entityManagement/attachment/attachmentActions";
import { Attributes } from "@sequelize/core";
import { RequestCookie } from "next/dist/compiled/@edge-runtime/cookies";
import { APIError, attemptAPIAction } from "@/util/api";
export async function tryCreateAttachment(request: Request) {
// Make sure the DB is ready
@@ -127,6 +127,17 @@ export async function tryCreateAttachment(request: Request) {
);
}
/**
* @swagger
* /api/attachment:
* get:
* description: Returns all attachments
* responses:
* 200:
* description: idk
*/
export async function tryFetchAttachments(request: Request) {
await Post.sync();