feat: connect admin image workflow
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-08 22:16:59 -04:00
parent c382852924
commit a21d1ae854
9 changed files with 120 additions and 0 deletions
@@ -78,6 +78,13 @@ export async function registerAdminImageRoutes(app, options) {
return reply.code(201).send({ data: toAdminInventoryImageDto(image) });
});
app.get('/inventory/:id/images', async (request) => ({
data: (await inventoryImageService.list({
inventoryItemId: request.params.id,
sellerId: (await authenticateAdmin(request)).sellerId,
})).map(toAdminInventoryImageDto),
}));
async function authorizeAdminMutation(request) {
const admin = await authenticateAdmin(request);
if (!admin?.sellerId) {