feat: add ability to edit items.
All checks were successful
Deploy to Production / test (push) Successful in 37s
All checks were successful
Deploy to Production / test (push) Successful in 37s
This commit is contained in:
@@ -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",
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user