Skip to content

Commit

Permalink
Merge branch 'dev' into chat-feat
Browse files Browse the repository at this point in the history
  • Loading branch information
Hassan950 authored Jun 9, 2020
2 parents ab5923e + 73150d4 commit cc1b62f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/chat.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ exports.getChat = async (req, res, next) => {
});
};


/**
* A middleware that gets a specific thread of the user with its messages
* wrapped in paging object sorted from most frequent one to least.
Expand All @@ -46,6 +47,7 @@ exports.getThread = async (req, res, next) => {
});
};


/**
* A middleware that sends a message to a specific thread of the user.
*
Expand All @@ -66,7 +68,6 @@ exports.sendMessage = async (req, res, next) => {
res.sendStatus(httpStatus.CREATED);
};


/**
* A middleware that deletes a specific message from a thread
*
Expand Down
3 changes: 3 additions & 0 deletions src/services/chat.serivce.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ exports.getChat = async (userId, query) => {
return { data, total };
};


/**
* A method that gets a specific thread of the user with its messages
* wrapped in paging object sorted from most frequent one to least.
Expand Down Expand Up @@ -110,6 +111,7 @@ exports.getThread = async (userId, threadId, query) => {
return data;
};


/**
* A method that sends a message to a specific thread of the user.
*
Expand Down Expand Up @@ -186,6 +188,7 @@ exports.sendMessage = async (userId, recId, message) => {
return true;
};


/**
* A method that deletes a specific message from a thread
*
Expand Down

0 comments on commit cc1b62f

Please sign in to comment.