From 142571e1ef9395b1f47633b66be9b63761198aa2 Mon Sep 17 00:00:00 2001 From: Mitko Nikov Date: Fri, 9 Feb 2024 01:44:03 +0100 Subject: [PATCH] Added a link to the file resource. --- backend/src/models/file.ts | 2 +- backend/src/resources/files.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/models/file.ts b/backend/src/models/file.ts index fc4476f..c3b4806 100644 --- a/backend/src/models/file.ts +++ b/backend/src/models/file.ts @@ -1,8 +1,8 @@ import mongoose from 'mongoose'; const schema = new mongoose.Schema({ - bucket: String, filepath: String, + link: String, title: String, description: String, published: Date, diff --git a/backend/src/resources/files.ts b/backend/src/resources/files.ts index 18aac0a..c90863d 100644 --- a/backend/src/resources/files.ts +++ b/backend/src/resources/files.ts @@ -14,6 +14,9 @@ export const files = { resource: File, options: { properties: { + link: { + type: 'string', + }, title: { type: 'string', },