This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user