mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 12:21:34 +00:00
doesn't need to be a public route (should go behind usual API auth)
This commit is contained in:
parent
a8081b9a74
commit
4cdf54d049
1 changed files with 2 additions and 2 deletions
|
|
@ -238,10 +238,9 @@ class ShareController {
|
||||||
res.sendStatus(204)
|
res.sendStatus(204)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Public route
|
|
||||||
* GET: /api/share/mediaitem/:id
|
* GET: /api/share/mediaitem/:id
|
||||||
* get existing share from mediaItemId
|
* get existing share from mediaItemId
|
||||||
* (or would it be better to return just the slug?)
|
* (or would it be better to return just the slug instead of whole share object?)
|
||||||
*
|
*
|
||||||
* @param {import('express').Request} req
|
* @param {import('express').Request} req
|
||||||
* @param {import('express').Response} res
|
* @param {import('express').Response} res
|
||||||
|
|
@ -261,6 +260,7 @@ class ShareController {
|
||||||
|
|
||||||
if (existingMediaItemShare) {
|
if (existingMediaItemShare) {
|
||||||
return res.status(200).json(existingMediaItemShare.toJSONForClient()); // or would it be better to return just the slug?
|
return res.status(200).json(existingMediaItemShare.toJSONForClient()); // or would it be better to return just the slug?
|
||||||
|
//return res.status(200).json(existingMediaItemShare.slug.toJSONForClient());
|
||||||
} else {
|
} else {
|
||||||
return res.status(404).send('Share not found');
|
return res.status(404).send('Share not found');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue