Add Stargil Nails logo and favicon
- Replace emoji icons with Stargil Nails logo in header and loading spinner - Add favicon.png to public directory - Copy logo to public/assets for browser access - Update vite.config.ts to serve public directory - Add favicon link to HTML head section
This commit is contained in:
@@ -41,18 +41,29 @@ const create = os
|
||||
})
|
||||
)
|
||||
.handler(async ({ input }) => {
|
||||
await assertOwner(input.sessionId);
|
||||
const id = randomUUID();
|
||||
const slot: Availability = {
|
||||
id,
|
||||
date: input.date,
|
||||
time: input.time,
|
||||
durationMinutes: input.durationMinutes,
|
||||
status: "free",
|
||||
createdAt: new Date().toISOString(),
|
||||
};
|
||||
await kv.setItem(id, slot);
|
||||
return slot;
|
||||
try {
|
||||
await assertOwner(input.sessionId);
|
||||
// Prevent duplicate slot on same date+time
|
||||
const existing = await kv.getAllItems();
|
||||
const conflict = existing.some((s) => s.date === input.date && s.time === input.time);
|
||||
if (conflict) {
|
||||
throw new Error("Es existiert bereits ein Slot zu diesem Datum und dieser Uhrzeit.");
|
||||
}
|
||||
const id = randomUUID();
|
||||
const slot: Availability = {
|
||||
id,
|
||||
date: input.date,
|
||||
time: input.time,
|
||||
durationMinutes: input.durationMinutes,
|
||||
status: "free",
|
||||
createdAt: new Date().toISOString(),
|
||||
};
|
||||
await kv.setItem(id, slot);
|
||||
return slot;
|
||||
} catch (err) {
|
||||
console.error("availability.create error", err);
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
|
||||
const update = os
|
||||
|
Reference in New Issue
Block a user