1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

more Plecos validations

This commit is contained in:
Matthias Kretschmann 2019-06-03 16:05:53 +02:00
parent e5ef417025
commit 7dbe383269
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 8 additions and 4 deletions

View File

@ -12,11 +12,11 @@ const AssetModel = {
type: '',
license: null,
copyrightHolder: null,
workExample: null,
workExample: '',
files: [],
categories: [],
links: [],
inLanguage: null,
inLanguage: '',
tags: [],
price: ''
},

View File

@ -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,

View File

@ -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']) {