mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
@@ -113,8 +113,9 @@ router.post(
|
||||
|
||||
try {
|
||||
const record = await service.readByKey(keys as any, req.sanitizedQuery);
|
||||
|
||||
res.locals.payload = {
|
||||
data: res.locals.savedFiles.length === 1 ? record![0] : record || null,
|
||||
data: record,
|
||||
};
|
||||
} catch (error) {
|
||||
if (error instanceof ForbiddenException) {
|
||||
@@ -201,7 +202,8 @@ router.get(
|
||||
const record = await service.readByKey(keys as any, req.sanitizedQuery);
|
||||
res.locals.payload = { data: record || null };
|
||||
return next();
|
||||
})
|
||||
}),
|
||||
respond
|
||||
);
|
||||
|
||||
router.patch(
|
||||
|
||||
Reference in New Issue
Block a user