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:
parent
e5ef417025
commit
7dbe383269
@ -12,11 +12,11 @@ const AssetModel = {
|
||||
type: '',
|
||||
license: null,
|
||||
copyrightHolder: null,
|
||||
workExample: null,
|
||||
workExample: '',
|
||||
files: [],
|
||||
categories: [],
|
||||
links: [],
|
||||
inLanguage: null,
|
||||
inLanguage: '',
|
||||
tags: [],
|
||||
price: ''
|
||||
},
|
||||
|
@ -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,
|
||||
|
@ -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']) {
|
||||
|
Loading…
Reference in New Issue
Block a user