Attachment form and table, MusicXML renderer
This commit is contained in:
@@ -68,7 +68,7 @@ const app = new Elysia()
|
||||
console.log(`${timestamp} ${method} ${request.url} ${ip}`);
|
||||
})
|
||||
|
||||
// --- AUTHENTICATION ------------------------------------------------------
|
||||
// --- MARK: AUTHENTICATION ------------------------------------------------
|
||||
|
||||
.get("/me", async ({ user }) => {
|
||||
|
||||
@@ -145,7 +145,7 @@ const app = new Elysia()
|
||||
.execute();
|
||||
})
|
||||
|
||||
// --- PIECE CRUD ----------------------------------------------------------
|
||||
// --- MARK: PIECE CRUD ----------------------------------------------------
|
||||
|
||||
.post("/piece", async ({ db, body: { name, composer, lyricist, arranger }, user }) => {
|
||||
|
||||
@@ -248,7 +248,7 @@ const app = new Elysia()
|
||||
}),
|
||||
})
|
||||
|
||||
// --- ATTACHMENT CRUD -----------------------------------------------------
|
||||
// --- MARK: ATTACHMENT CRUD -----------------------------------------------
|
||||
|
||||
.post("piece/:pieceId/attachment", async ({ db, body: { filename, mediaType, data }, params: { pieceId }, user }) => {
|
||||
|
||||
@@ -264,8 +264,8 @@ const app = new Elysia()
|
||||
|
||||
await db
|
||||
.insertInto("File")
|
||||
.ignore()
|
||||
.values({ sha256, data: dataArray })
|
||||
.onConflict((cb) => cb.column("sha256").doNothing())
|
||||
.execute();
|
||||
|
||||
const res = await db
|
||||
|
||||
Reference in New Issue
Block a user