diff --git a/client/src/models/AssetModel.ts b/client/src/models/AssetModel.ts index e250909..7538119 100644 --- a/client/src/models/AssetModel.ts +++ b/client/src/models/AssetModel.ts @@ -12,11 +12,11 @@ const AssetModel = { type: '', license: null, copyrightHolder: null, - workExample: null, + workExample: '', files: [], categories: [], links: [], - inLanguage: null, + inLanguage: '', tags: [], price: '' }, diff --git a/client/src/routes/Publish/index.tsx b/client/src/routes/Publish/index.tsx index 0f9b655..54c9ff6 100644 --- a/client/src/routes/Publish/index.tsx +++ b/client/src/routes/Publish/index.tsx @@ -273,7 +273,10 @@ export default class Publish extends Component<{}, PublishState> { base: Object.assign(AssetModel.base, { name: this.state.name, description: this.state.description, - dateCreated: new Date(this.state.dateCreated).toISOString(), + dateCreated: + new Date(this.state.dateCreated) + .toISOString() + .split('.')[0] + 'Z', // remove milliseconds author: this.state.author, license: this.state.license, copyrightHolder: this.state.copyrightHolder, diff --git a/server/src/routes/UrlCheckRouter.ts b/server/src/routes/UrlCheckRouter.ts index 09eccae..dbe6eff 100644 --- a/server/src/routes/UrlCheckRouter.ts +++ b/server/src/routes/UrlCheckRouter.ts @@ -31,8 +31,9 @@ export class UrlCheckRouter { result.found = true if (response.headers['content-length']) { - result.contentLength = + result.contentLength = parseInt( response.headers['content-length'] + ) // convert to number } if (response.headers['content-type']) {