From ea0027cac3618845db4a260d5732d2bd4777f47f Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 9 Sep 2022 15:41:11 +0200 Subject: [PATCH] Added a default value for the assetEnding in the media controller --- controller/media.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/media.ts b/controller/media.ts index ceb43b8..2d9d98f 100644 --- a/controller/media.ts +++ b/controller/media.ts @@ -8,8 +8,8 @@ import {bucket} from "./bucket"; * @param assetName The name of the asset * @param assetEnding The file ending of the asset */ -export const createMedia = (clientId: number, assetName: string, assetEnding: string) => - Media.create({clientId, assetName, assetEnding}); +export const createMedia = (clientId: number, assetName: string, assetEnding: string | undefined) => + Media.create({clientId, assetName, assetEnding: assetEnding || "txt"}); /** * Gets a media object by the asset id