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: '',
|
type: '',
|
||||||
license: null,
|
license: null,
|
||||||
copyrightHolder: null,
|
copyrightHolder: null,
|
||||||
workExample: null,
|
workExample: '',
|
||||||
files: [],
|
files: [],
|
||||||
categories: [],
|
categories: [],
|
||||||
links: [],
|
links: [],
|
||||||
inLanguage: null,
|
inLanguage: '',
|
||||||
tags: [],
|
tags: [],
|
||||||
price: ''
|
price: ''
|
||||||
},
|
},
|
||||||
|
@ -273,7 +273,10 @@ export default class Publish extends Component<{}, PublishState> {
|
|||||||
base: Object.assign(AssetModel.base, {
|
base: Object.assign(AssetModel.base, {
|
||||||
name: this.state.name,
|
name: this.state.name,
|
||||||
description: this.state.description,
|
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,
|
author: this.state.author,
|
||||||
license: this.state.license,
|
license: this.state.license,
|
||||||
copyrightHolder: this.state.copyrightHolder,
|
copyrightHolder: this.state.copyrightHolder,
|
||||||
|
@ -31,8 +31,9 @@ export class UrlCheckRouter {
|
|||||||
result.found = true
|
result.found = true
|
||||||
|
|
||||||
if (response.headers['content-length']) {
|
if (response.headers['content-length']) {
|
||||||
result.contentLength =
|
result.contentLength = parseInt(
|
||||||
response.headers['content-length']
|
response.headers['content-length']
|
||||||
|
) // convert to number
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.headers['content-type']) {
|
if (response.headers['content-type']) {
|
||||||
|
Loading…
Reference in New Issue
Block a user