mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 21:16:17 +02:00
Fix album permissions by role
This commit is contained in:
@@ -8,9 +8,12 @@ const getDetail = async (
|
||||
req: TypedRequest<typeof validation.albums.detail>,
|
||||
res: Response
|
||||
) => {
|
||||
const { albumId } = req.params;
|
||||
const { albumId, serverId } = req.params;
|
||||
|
||||
const album = await service.albums.findById(req.authUser, { id: albumId });
|
||||
const album = await service.albums.findById(req.authUser, {
|
||||
id: albumId,
|
||||
serverId,
|
||||
});
|
||||
|
||||
const success = ApiSuccess.ok({
|
||||
data: toApiModel.albums({ items: [album], user: req.authUser })[0],
|
||||
|
||||
Reference in New Issue
Block a user