Validate contribution docs against schema
Currently requires an open PR branch for the schemas, which is adding date and time for contributions. refs #30
This commit is contained in:
@@ -14,6 +14,8 @@ class Contribution {
|
||||
*/
|
||||
static deserialize(serialized) {
|
||||
let {
|
||||
date,
|
||||
time,
|
||||
kind,
|
||||
description,
|
||||
details,
|
||||
@@ -21,6 +23,8 @@ class Contribution {
|
||||
} = JSON.parse(serialized.toString('utf8'));
|
||||
|
||||
return {
|
||||
date,
|
||||
time,
|
||||
kind,
|
||||
description,
|
||||
details,
|
||||
@@ -38,6 +42,8 @@ class Contribution {
|
||||
static serialize(deserialized) {
|
||||
let {
|
||||
contributorIpfsHash,
|
||||
date,
|
||||
time,
|
||||
kind,
|
||||
description,
|
||||
url,
|
||||
@@ -50,6 +56,8 @@ class Contribution {
|
||||
"contributor": {
|
||||
"ipfs": contributorIpfsHash
|
||||
},
|
||||
date,
|
||||
time,
|
||||
kind,
|
||||
description,
|
||||
"details": details || {}
|
||||
|
||||
Reference in New Issue
Block a user