Added Notes feature (#8)
Also: - Moved buttons to top of request - Tweaked layout of full request view - Added code to ensure that users may only add history and notes to their own requests; security FTW!
This commit is contained in:
@@ -25,6 +25,13 @@ export default {
|
||||
*/
|
||||
journal: () => http.get('journal/'),
|
||||
|
||||
/**
|
||||
* Add a note for a prayer request
|
||||
* @param {string} requestId The Id of the request to which the note applies
|
||||
* @param {string} notes The notes to be added
|
||||
*/
|
||||
addNote: (requestId, notes) => http.post(`request/${requestId}/note`, { notes }),
|
||||
|
||||
/**
|
||||
* Add a new prayer request
|
||||
* @param {string} requestText The text of the request to be added
|
||||
@@ -55,6 +62,12 @@ export default {
|
||||
/**
|
||||
* Get all answered requests, along with the text they had when it was answered
|
||||
*/
|
||||
getAnsweredRequests: () => http.get('request/answered')
|
||||
getAnsweredRequests: () => http.get('request/answered'),
|
||||
|
||||
/**
|
||||
* Get past notes for a prayer request
|
||||
* @param {string} requestId The Id of the request for which notes should be retrieved
|
||||
*/
|
||||
getNotes: requestId => http.get(`request/${requestId}/notes`)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user