Added a default value for the assetEnding in the media controller

This commit is contained in:
Mathias Wagner 2022-09-09 15:41:11 +02:00
parent 55df6c907a
commit ea0027cac3
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -8,8 +8,8 @@ import {bucket} from "./bucket";
* @param assetName The name of the asset * @param assetName The name of the asset
* @param assetEnding The file ending of the asset * @param assetEnding The file ending of the asset
*/ */
export const createMedia = (clientId: number, assetName: string, assetEnding: string) => export const createMedia = (clientId: number, assetName: string, assetEnding: string | undefined) =>
Media.create({clientId, assetName, assetEnding}); Media.create({clientId, assetName, assetEnding: assetEnding || "txt"});
/** /**
* Gets a media object by the asset id * Gets a media object by the asset id