feat: add ability to edit items.
All checks were successful
Deploy to Production / test (push) Successful in 37s

This commit is contained in:
syntaxbullet
2026-02-19 15:53:13 +01:00
parent 7cc2f61db6
commit 9eba64621a
6 changed files with 320 additions and 67 deletions

View File

@@ -66,7 +66,7 @@ async function handler(ctx: RouteContext): Promise<Response | null> {
return new Response(file, {
headers: {
"Content-Type": contentType,
"Cache-Control": "public, max-age=86400", // Cache for 24 hours
"Cache-Control": "no-cache",
}
});
}

View File

@@ -188,7 +188,7 @@ async function handler(ctx: RouteContext): Promise<Response | null> {
const filePath = join(assetsDir, fileName);
await Bun.write(filePath, buffer);
const assetUrl = `/assets/items/${fileName}`;
const assetUrl = `/assets/items/${fileName}?v=${Date.now()}`;
await itemsService.updateItem(item.id, {
iconUrl: assetUrl,
imageUrl: assetUrl,
@@ -352,7 +352,7 @@ async function handler(ctx: RouteContext): Promise<Response | null> {
const filePath = join(assetsDir, fileName);
await Bun.write(filePath, buffer);
const assetUrl = `/assets/items/${fileName}`;
const assetUrl = `/assets/items/${fileName}?v=${Date.now()}`;
const updatedItem = await itemsService.updateItem(id, {
iconUrl: assetUrl,
imageUrl: assetUrl,