summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-10-23 20:44:35 +0300
committerLauri Ojansivu <x@xet7.org>2018-10-23 20:44:35 +0300
commit0de01356197d0317f538aa9a3c6e0213b5dfd396 (patch)
tree5a691082a3da622f0ccbef723f07619ed463b6e4 /models/users.js
parentfa548a4c3266beaaa8da1049dc76602bfd3676e7 (diff)
parentdfdba25ea0b9c3bcca81a9c8ba6a3e9ed7f4eec7 (diff)
downloadwekan-0de01356197d0317f538aa9a3c6e0213b5dfd396.tar.gz
wekan-0de01356197d0317f538aa9a3c6e0213b5dfd396.tar.bz2
wekan-0de01356197d0317f538aa9a3c6e0213b5dfd396.zip
Merge branch 'api-fixes' of https://github.com/bentiss/wekan into bentiss-api-fixes
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/models/users.js b/models/users.js
index 4f2184e4..630f4703 100644
--- a/models/users.js
+++ b/models/users.js
@@ -713,10 +713,10 @@ if (Meteor.isServer) {
}
});
- JsonRoutes.add('GET', '/api/users/:id', function (req, res) {
+ JsonRoutes.add('GET', '/api/users/:userId', function (req, res) {
try {
Authentication.checkUserId(req.userId);
- const id = req.params.id;
+ const id = req.params.userId;
JsonRoutes.sendResult(res, {
code: 200,
data: Meteor.users.findOne({ _id: id }),
@@ -730,10 +730,10 @@ if (Meteor.isServer) {
}
});
- JsonRoutes.add('PUT', '/api/users/:id', function (req, res) {
+ JsonRoutes.add('PUT', '/api/users/:userId', function (req, res) {
try {
Authentication.checkUserId(req.userId);
- const id = req.params.id;
+ const id = req.params.userId;
const action = req.body.action;
let data = Meteor.users.findOne({ _id: id });
if (data !== undefined) {
@@ -872,10 +872,10 @@ if (Meteor.isServer) {
}
});
- JsonRoutes.add('DELETE', '/api/users/:id', function (req, res) {
+ JsonRoutes.add('DELETE', '/api/users/:userId', function (req, res) {
try {
Authentication.checkUserId(req.userId);
- const id = req.params.id;
+ const id = req.params.userId;
Meteor.users.remove({ _id: id });
JsonRoutes.sendResult(res, {
code: 200,