Fixed critical bug UploadConfirmation couldn't be found

pull/5/head
Trivernis 5 years ago
parent 027ea73d08
commit b1b5f82f95

@ -59,7 +59,7 @@ export class UploadRoute extends Route {
this.router.use(fileUpload());
// Uploads a file to the data directory and returns the filename
this.router.use(async (req, res) => {
let uploadConfirmation: UploadConfirmation;
let uploadConfirmation: IUploadConfirmation;
if (req.session.userId) {
if (req.files.profilePicture) {
uploadConfirmation = await this.uploadProfilePicture(req);
@ -94,7 +94,7 @@ export class UploadRoute extends Route {
* The user gets updated with the new profile picture url.
* @param request
*/
private async uploadProfilePicture(request: any): Promise<UploadConfirmation> {
private async uploadProfilePicture(request: any): Promise<IUploadConfirmation> {
let success = false;
let error: string;
let fileName: string;

Loading…
Cancel
Save