Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- accept = (req, res) => {
- this._model.update({
- user: new mongoose.Types.ObjectId(req.params.uid)
- }, {
- $set: {
- status: 'active'
- },
- }, (err, obj) => {
- if (err || !obj) {
- res.send(err);
- } else {
- res.send(obj);
- }
- });
- }
- {
- "_id":"5d3189a00789e24a23438a0d",
- "status":"active",
- "code":"CT-123-345-234-233-423344",
- "created_Date":"2019-07-19T09:13:04.297Z",
- "updated_Date":"2019-07-19T09:13:04.297Z",
- "__v":0
- }
- api.abc.com/api/accept/5cfe4dd898fd225ef1cabdsd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement