nfp_sites/nfp_moe/app/api/staff.js

39 lines
677 B
JavaScript
Raw Normal View History

2019-10-01 11:35:00 +00:00
const common = require('./common')
exports.createStaff = function(body) {
2019-10-01 11:35:00 +00:00
return common.sendRequest({
method: 'POST',
url: '/api/staff',
body: body,
})
}
exports.updateStaff = function(id, body) {
2019-10-01 11:35:00 +00:00
return common.sendRequest({
method: 'PUT',
url: '/api/staff/' + id,
body: body,
})
}
exports.getAllStaff = function() {
2019-10-01 11:35:00 +00:00
return common.sendRequest({
method: 'GET',
url: '/api/staff',
})
}
exports.getStaff = function(id) {
2019-10-01 11:35:00 +00:00
return common.sendRequest({
method: 'GET',
url: '/api/staff/' + id,
})
}
exports.removeStaff = function(id) {
2019-10-01 11:35:00 +00:00
return common.sendRequest({
method: 'DELETE',
url: '/api/staff/' + id,
})
}