Showing
1 changed file
with
2 additions
and
3 deletions
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | const shareBuyModel = require('../models/share-buy'), | 3 | const shareBuyModel = require('../models/share-buy'), |
4 | - headerModel = require('../../../doraemon/models/header'), | ||
5 | - co = require('bluebird').coroutine; | 4 | + headerModel = require('../../../doraemon/models/header'); |
6 | 5 | ||
7 | exports.index = (req, res, next) => { | 6 | exports.index = (req, res, next) => { |
8 | let activityId = req.query.act_id || 2023, | 7 | let activityId = req.query.act_id || 2023, |
@@ -77,5 +76,5 @@ exports.getCouponCode = (req, res, next) => { | @@ -77,5 +76,5 @@ exports.getCouponCode = (req, res, next) => { | ||
77 | 76 | ||
78 | req.ctx(shareBuyModel).getCouponCode(uid, couponId, protocol).then(result => { | 77 | req.ctx(shareBuyModel).getCouponCode(uid, couponId, protocol).then(result => { |
79 | res.json(result); | 78 | res.json(result); |
80 | - }) | 79 | + }).catch(next); |
81 | }; | 80 | }; |
-
Please register or login to post a comment