diff --git a/backend/src/models/Donations.js b/backend/src/models/Donations.js index 1273a6f77..742bfb569 100644 --- a/backend/src/models/Donations.js +++ b/backend/src/models/Donations.js @@ -2,10 +2,15 @@ import { v4 as uuid } from 'uuid' export default { id: { type: 'string', primary: true, default: uuid }, - showDonations: { type: 'boolean' }, - goal: { type: 'number' }, - progress: { type: 'number' }, - createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, + showDonations: { type: 'boolean', required: true }, + goal: { type: 'number', required: true }, + progress: { type: 'number', required: true }, + createdAt: { + type: 'string', + isoDate: true, + required: true, + default: () => new Date().toISOString(), + }, updatedAt: { type: 'string', isoDate: true, diff --git a/backend/src/schema/types/type/Donations.gql b/backend/src/schema/types/type/Donations.gql index 47dae9340..2186ee63a 100644 --- a/backend/src/schema/types/type/Donations.gql +++ b/backend/src/schema/types/type/Donations.gql @@ -1,10 +1,10 @@ type Donations { id: ID! - createdAt: String - updatedAt: String - showDonations: Boolean! # Wolle make it required in the schema - goal: Int! # Wolle make it required in the schema - progress: Int! # Wolle make it required in the schema + createdAt: String! + updatedAt: String! + showDonations: Boolean! + goal: Int! + progress: Int! } type Query { diff --git a/webapp/components/DonationInfo/DonationInfo.vue b/webapp/components/DonationInfo/DonationInfo.vue index 3a6e74648..dc4184e19 100644 --- a/webapp/components/DonationInfo/DonationInfo.vue +++ b/webapp/components/DonationInfo/DonationInfo.vue @@ -1,6 +1,6 @@