@@ -2,6 +2,9 @@ const joi = require('joi')
2
2
3
3
const createTask = async ( req , res , next ) => {
4
4
const schema = joi . object ( ) . keys ( {
5
+ title : joi . string ( ) . required ( ) ,
6
+ purpose : joi . string ( ) . required ( ) ,
7
+ featureUrl : joi . string ( ) . optional ( ) ,
5
8
type : joi . string ( ) . required ( ) ,
6
9
links : joi . array ( ) . items ( joi . string ( ) ) ,
7
10
endsOn : joi . string ( ) ,
@@ -20,7 +23,8 @@ const createTask = async (req, res, next) => {
20
23
gold : joi . number ( ) ,
21
24
silver : joi . number ( ) ,
22
25
bronze : joi . number ( )
23
- } ) . optional ( )
26
+ } ) . optional ( ) ,
27
+ isNoteworthy : joi . bool ( ) . optional ( )
24
28
} )
25
29
26
30
try {
@@ -34,6 +38,9 @@ const createTask = async (req, res, next) => {
34
38
35
39
const updateTask = async ( req , res , next ) => {
36
40
const schema = joi . object ( ) . keys ( {
41
+ title : joi . string ( ) . optional ( ) ,
42
+ purpose : joi . string ( ) . optional ( ) ,
43
+ featureUrl : joi . string ( ) . optional ( ) ,
37
44
type : joi . string ( ) . optional ( ) ,
38
45
links : joi . array ( ) . items ( joi . string ( ) ) ,
39
46
endsOn : joi . string ( ) . optional ( ) ,
@@ -52,7 +59,8 @@ const updateTask = async (req, res, next) => {
52
59
gold : joi . number ( ) ,
53
60
silver : joi . number ( ) ,
54
61
bronze : joi . number ( )
55
- } ) . optional ( )
62
+ } ) . optional ( ) ,
63
+ isNoteworthy : joi . bool ( ) . optional ( )
56
64
} )
57
65
58
66
try {
0 commit comments