Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitrp committed Feb 5, 2019
1 parent 4cabaf6 commit 2f46664
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/api/shelters/routes/addShelter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const Shelter = require('../model/Shelter')
const addShelterSchema = require('../schemas/addShelter')
const User = require('../../users/model/User')

module.exports = {
method: 'POST',
Expand All @@ -9,6 +10,9 @@ module.exports = {
let shelter = new Shelter(request.payload)
shelter.user = request.auth.credentials.id

const user = await User.findOne({ _id: shelter.user})
shelter.verified = user.verifiedMobile

await shelter.save()

return shelter
Expand Down

0 comments on commit 2f46664

Please sign in to comment.