|
| 1 | +/** |
| 2 | + * This file is part of the ALICE Electronic Logbook v2, also known as Jiskefet. |
| 3 | + * Copyright (C) 2020 Stichting Hogeschool van Amsterdam |
| 4 | + * |
| 5 | + * This program is free software: you can redistribute it and/or modify |
| 6 | + * it under the terms of the GNU Affero General Public License as published |
| 7 | + * by the Free Software Foundation, either version 3 of the License, or |
| 8 | + * (at your option) any later version. |
| 9 | + * |
| 10 | + * This program is distributed in the hope that it will be useful, |
| 11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | + * GNU Affero General Public License for more details. |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU Affero General Public License |
| 16 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 17 | + */ |
| 18 | + |
| 19 | +/** |
| 20 | + * create a new flp. |
| 21 | + * |
| 22 | + * @param {Object} request The *request* object represents the HTTP request and has properties for the request query |
| 23 | + * string, parameters, body, HTTP headers, and so on. |
| 24 | + * @param {Object} response The *response* object represents the HTTP response that an Express app sends when it gets an |
| 25 | + * HTTP request. |
| 26 | + * @param {Function} next The *next* object represents the next middleware function which is used to pass control to the |
| 27 | + * next middleware function. |
| 28 | + * @returns {undefined} |
| 29 | + */ |
| 30 | +const create = (request, response, next) => { |
| 31 | + response.status(501).json({ |
| 32 | + errors: [ |
| 33 | + { |
| 34 | + status: '501', |
| 35 | + title: 'Not implemented', |
| 36 | + }, |
| 37 | + ], |
| 38 | + }); |
| 39 | +}; |
| 40 | + |
| 41 | +/** |
| 42 | + * update flp. |
| 43 | + * |
| 44 | + * @param {Object} request The *request* object represents the HTTP request and has properties for the request query |
| 45 | + * string, parameters, body, HTTP headers, and so on. |
| 46 | + * @param {Object} response The *response* object represents the HTTP response that an Express app sends when it gets an |
| 47 | + * HTTP request. |
| 48 | + * @param {Function} next The *next* object represents the next middleware function which is used to pass control to the |
| 49 | + * next middleware function. |
| 50 | + * @returns {undefined} |
| 51 | + */ |
| 52 | +const update = (request, response, next) => { |
| 53 | + response.status(501).json({ |
| 54 | + errors: [ |
| 55 | + { |
| 56 | + status: '501', |
| 57 | + title: 'Not implemented', |
| 58 | + }, |
| 59 | + ], |
| 60 | + }); |
| 61 | +}; |
| 62 | + |
| 63 | +/** |
| 64 | + * read flp. |
| 65 | + * |
| 66 | + * @param {Object} request The *request* object represents the HTTP request and has properties for the request query |
| 67 | + * string, parameters, body, HTTP headers, and so on. |
| 68 | + * @param {Object} response The *response* object represents the HTTP response that an Express app sends when it gets an |
| 69 | + * HTTP request. |
| 70 | + * @param {Function} next The *next* object represents the next middleware function which is used to pass control to the |
| 71 | + * next middleware function. |
| 72 | + * @returns {undefined} |
| 73 | + */ |
| 74 | +const read = (request, response, next) => { |
| 75 | + response.status(501).json({ |
| 76 | + errors: [ |
| 77 | + { |
| 78 | + status: '501', |
| 79 | + title: 'Not implemented', |
| 80 | + }, |
| 81 | + ], |
| 82 | + }); |
| 83 | +}; |
| 84 | + |
| 85 | +module.exports = { |
| 86 | + create, |
| 87 | + update, |
| 88 | + read, |
| 89 | +}; |
0 commit comments