diff --git a/controller/media.ts b/controller/media.ts index 2d9d98f..0bb9ba6 100644 --- a/controller/media.ts +++ b/controller/media.ts @@ -12,7 +12,13 @@ export const createMedia = (clientId: number, assetName: string, assetEnding: st Media.create({clientId, assetName, assetEnding: assetEnding || "txt"}); /** - * Gets a media object by the asset id + * Gets a media object from an id + * @param assetId The id of the asset to search + */ +export const getMediaById = (assetId: string) => Media.findOne({assetId}, {_id: 0, __v: 0}); + +/** + * Gets a complete media object by the asset id * @param assetId The id of the asset to search */ export const getMediaObject = (assetId: string) => Media.findOne({assetId});