Stephan
8bf18267d1
Fix: Add winston; And: Add custom error handlers
...
+ addCustomHandler()
+ removeCustomHandler()
2022-04-28 14:39:16 +02:00
Stephan
9ac4fb8efd
Add logger to main
...
+ Remove whitespace
2022-04-28 14:39:16 +02:00
Stephan
9516b60d93
Add logger using winston
...
+ Add formats
+ Add debug and error log files
2022-04-28 14:39:16 +02:00
Stephan
382a42d439
Add basic error handling
...
+ Add express-async-errors package to handle async errors
+ Add ForwaradableError class (Base class for all project-specific errors)
+ Add defaultErrorHandler middleware which handles errors and sends info to the client
2022-04-28 14:39:16 +02:00
Stefan
1f867135f9
Merge branch 'dev' into feature-email-verification
2022-04-28 14:07:53 +02:00
Stephan
f6d194f0c9
Fix: The server should always return 403 on failed login
2022-04-28 13:00:14 +02:00
Stefan-5422
32d4bdf3e0
Minor changes
2022-04-28 13:00:14 +02:00
Stefan-5422
dd956476d7
Minor changes
...
Fixed complaints for PR #30
2022-04-28 12:57:15 +02:00
Stefan-5422
f94f89e99e
Update common.ts types because nagging.
2022-04-28 12:57:15 +02:00
Stefan-5422
269cc33a33
Update Event Endpoints to give better errors;
2022-04-28 12:57:15 +02:00
github-actions[bot] and Stefan-5422
4a57f75997
[create-pull-request] push formatted files ( #27 )
...
Co-authored-by: Stefan-5422 <[email protected] >
2022-04-28 12:49:07 +02:00
Stefan-5422
035eb8771c
Fix json parser return stack trace see Issue #24 ;
2022-04-28 12:49:07 +02:00
Stephan
5418d7b790
Refactor the endpoints to share common code
2022-04-28 12:49:07 +02:00
Stephan
0fb8a9ca73
Update the admin revision on password change
...
+ Update type of revision to DateTime
2022-04-28 12:49:07 +02:00
Stephan
f3c165bbd7
Restructure the process of changing a password
...
+ Requests are now dispatched to the according user ressource, not the collection
+ The current user can be referenced by setting the pid to 'current'
+ Refactored the error logic
2022-04-28 12:49:07 +02:00
Stephan
ff9d5b7912
Change the controller for changing passwords to use PIDs and not usernames
2022-04-28 12:49:07 +02:00
Stephan
94ce50aaf1
Add a controller and router to update a user's password
...
+ Add a function to update the password internally
+ The current interface could be improved (made more RESTful)
2022-04-28 12:49:07 +02:00
Stephan
a2e314f036
Add the permission_level 'ELEVATED' to the default user
2022-04-28 12:49:07 +02:00
Stephan
ed90f1e6ae
Allow for groups to be specified when POSTing /api/admins
...
+ Add the admin router to the global app
2022-04-28 12:49:07 +02:00
Stephan
c0878d5614
Add code that ensures that an (admin) user is always present
2022-04-28 12:49:07 +02:00
Stephan
dd3133c3f3
Add router for the /admin endpoint
2022-04-28 12:49:07 +02:00
Stephan
84db24fdb4
Add controller for adding a user
...
+ Add function to narrow type of string to AdminLevel
2022-04-28 12:49:07 +02:00
Stephan
79c5c3752c
Extract code for error messages for better reusability
...
+ Create function for generating permission errors
2022-04-28 12:49:07 +02:00
Stephan
fdfbd22daf
Add a controller for getting all admin user details
...
+ Requires Authentication
2022-04-28 12:49:07 +02:00
Stephan
5e5b6bb60c
Add routes for admin authentication endpoints
...
+ Add router to the app
2022-04-28 12:49:07 +02:00
Stephan
4a65dd4665
Add authorization
2022-04-28 12:49:05 +02:00
Stephan
6d471eced2
Add function for deleting events
2022-04-28 12:49:05 +02:00
Stephan
2936aa77f1
FIX: Event endpoints are now using the correct format
2022-04-28 12:49:05 +02:00
Stephan
01077dab22
Change name from oragnisation to organisation
2022-04-27 08:34:25 +02:00
Stephan
bff9dcc5f8
Extract function to create an object by name
...
+ Add route to create groups
2022-04-26 16:04:26 +02:00
Stephan
fe6879ea56
Only show details when authenticated
2022-04-26 16:04:26 +02:00
Stephan
0c65aec96c
Add controller and routes for groups
2022-04-26 16:04:26 +02:00
Stephan
8aa4e5ef16
Improve error handling and simplify code
2022-04-26 16:04:26 +02:00
Stephan
ca11eba3d4
Add better error handling
2022-04-26 16:04:26 +02:00
Stephan
12034fa32a
Add function to update an organisation
...
+ Extract basicOrganisation and detailedOrganiation select types
2022-04-26 16:04:26 +02:00
Stephan
831017e7c2
Add routes for organisations
...
+ FIX: Change eventId type
2022-04-26 16:04:26 +02:00
Stephan
08e18db3c3
Extract common function to handle selecting organisations
2022-04-26 16:04:26 +02:00
Stephan
ab62e39d8e
Add function to create new organisations
...
+ Extract common functions from the admin controller
2022-04-26 16:04:26 +02:00
Stephan
37437152da
Add the organisation controller
...
+ Add function to get all organisation
+ Add function to get a specific organisation
2022-04-26 16:04:26 +02:00
Stefan-5422
62a5daa432
Add Endpoint to verify email codes
2022-04-25 08:57:32 +02:00
Stephan
d7e7694249
Fix: The server should always return 403 on failed login
2022-04-23 14:01:45 +02:00
Stefan-5422
43bb7baa88
Minor changes
2022-03-28 11:58:32 +02:00
Stefan-5422
68b9044a9d
Minor changes
...
Fixed complaints for PR #30
2022-03-28 11:58:32 +02:00
Stefan-5422
0f3b1ac707
Update common.ts types because nagging.
2022-03-28 11:58:32 +02:00
Stefan-5422
cdacc56f7f
Update Event Endpoints to give better errors;
2022-03-28 11:58:32 +02:00
github-actions[bot] and Stefan-5422
626ae40683
[create-pull-request] push formatted files ( #27 )
...
Co-authored-by: Stefan-5422 <[email protected] >
2022-03-20 17:37:51 +01:00
Stefan-5422
907c2c68fa
Fix json parser return stack trace see Issue #24 ;
2022-03-20 15:31:20 +01:00
Stefan-5422
c96537f5b4
Add handlebars;
2022-03-20 14:58:27 +01:00
Stefan-5422
a84fcdce8f
Fix fix bugs in the mail & mjml library files;
2022-03-20 14:28:52 +01:00
Stephan
064497a4ca
Refactor the endpoints to share common code
2022-01-02 17:36:21 +01:00