Add the default endpoints.
(self)
| 237 | return self.api |
| 238 | |
| 239 | def add_default_endpoints(self): |
| 240 | """Add the default endpoints.""" |
| 241 | # To test the server. |
| 242 | self.api.get(str(constants.Endpoint.PING))(ping) |
| 243 | |
| 244 | # To upload files. |
| 245 | self.api.post(str(constants.Endpoint.UPLOAD))(upload(self)) |
| 246 | |
| 247 | def add_cors(self): |
| 248 | """Add CORS middleware to the app.""" |