...
|
...
|
@@ -138,10 +138,10 @@ const whSurfController = { |
|
|
},
|
|
|
|
|
|
prizeCreate: async function(req, res) {
|
|
|
let param = req.body;
|
|
|
let param = req.body && req.body.prizes;
|
|
|
|
|
|
try {
|
|
|
if (param instanceof Array) {
|
|
|
if (param && param.length && param instanceof Array) {
|
|
|
let arr = param.map((value) => {
|
|
|
return valid(value, {
|
|
|
act_id: {type: 'number', empty: false},
|
...
|
...
|
@@ -179,10 +179,10 @@ const whSurfController = { |
|
|
},
|
|
|
|
|
|
prizeUpdate: async function(req, res) {
|
|
|
let param = req.body;
|
|
|
let param = req.body && req.body.prizes;
|
|
|
|
|
|
try {
|
|
|
if (param instanceof Array) {
|
|
|
if (param && param.length && param instanceof Array) {
|
|
|
let arr = param.map((value) => {
|
|
|
return valid(value, {
|
|
|
id: {type: 'number', empty: false},
|
...
|
...
|
|