Created
March 29, 2017 20:56
-
-
Save laerciobernardo/0362ad93095ae9ab11534eaaa5c2606a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Model = require('../models/company'); | |
const create = (obj) => { | |
return Model.create(obj); | |
}; | |
const remove = (uid) => { | |
let query = {uid: uid}; | |
return Model.remove(query); | |
}; | |
const update = (uid, obj) => { | |
let query = {uid: uid}; | |
return Model.update(query, obj); | |
}; | |
const addClient = (uid, obj) =>{ | |
} | |
const get = (uid) => { | |
let query = {uid: uid}; | |
return Model.findOne(query); | |
}; | |
const list = () => { | |
let query = {}; | |
return Model.find(query); | |
}; | |
module.exports = { | |
create, | |
remove, | |
update, | |
get, | |
list | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment