Max/Backend/UserControllerUpdate #94

Merged
Maxime merged 6 commits from Max/Backend/UserControllerUpdate into master 2024-03-14 21:53:35 +01:00
Owner

sur cette branche je vais poster changements sur UserController donc il me reste le Patch à faire et check ce que je dois protéger

sur cette branche je vais poster changements sur UserController donc il me reste le Patch à faire et check ce que je dois protéger
Maxime added 2 commits 2024-03-12 00:05:29 +01:00
protected post /user and get/users and return without password
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m58s
Build and test backend / Test-backend (pull_request) Successful in 1m55s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 23s
5c728098df
Maxime changed title from Max/Backend/UserControllerUpdate to WIP :Max/Backend/UserControllerUpdate 2024-03-12 00:05:48 +01:00
Maxime changed title from WIP :Max/Backend/UserControllerUpdate to WIP : Max/Backend/UserControllerUpdate 2024-03-12 00:06:01 +01:00
Maxime changed title from WIP : Max/Backend/UserControllerUpdate to WIP: Max/Backend/UserControllerUpdate 2024-03-12 00:06:45 +01:00
Maxime added 2 commits 2024-03-12 23:08:53 +01:00
oups I Forgor
added the post /user Endpoint
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m23s
Build and test backend / Test-backend (pull_request) Successful in 1m59s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 23s
4b0ea8cf40
Maxime changed title from WIP: Max/Backend/UserControllerUpdate to Max/Backend/UserControllerUpdate 2024-03-12 23:09:32 +01:00
Maxime added the
Done
Waiting for review
labels 2024-03-12 23:09:46 +01:00
Maxime added 1 commit 2024-03-12 23:16:55 +01:00
Merge branch 'master' into Max/Backend/UserControllerUpdate
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m0s
Build and test backend / Test-backend (pull_request) Successful in 1m58s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 25s
044648674c
tonitch reviewed 2024-03-13 13:52:57 +01:00
@ -24,3 +31,3 @@
@GetMapping("/user")
public ResponseEntity<User> getUser(@RequestHeader("Cookie") String authorization){
public ResponseEntity<Object[]> getUser(@RequestHeader("Authorization") String authorization){
Owner

Autant ça me fait mal que ça soit un Object mais je comprends mais pourquoi une liste du coup ?

Autant ça me fait mal que ça soit un Object mais je comprends mais pourquoi une liste du coup ?
Author
Owner

hashMapped !

hashMapped !
Maxime marked this conversation as resolved
@ -46,0 +83,4 @@
* @return all the user data without the password
*/
private Object[] userWithoutPassword(User user){
return new Object[] {user.getRegNo(),user.getFirstName(),user.getLastName(),user.getBirthDate(),user.getCountry(),user.getAddress(),user.getRole()};
Owner

est ce qu'une Map ne serait pas plus appropriée ?

est ce qu'une Map ne serait pas plus appropriée ?
Author
Owner

hashmapped !

hashmapped !
Maxime marked this conversation as resolved
@ -37,0 +38,4 @@
*/
public boolean modifyData(User poster, Map<String ,Object> updates, User target){
System.out.printf("%s and %s",poster.getRegNo(),target.getRegNo());
Owner

Si c'est du debug il faudrais l'enlever, si c'est du log c'est mieux d'utiliser Logger.info(msg) https://docs.oracle.com/en/java/javase/21/docs/api/java.logging/java/util/logging/Logger.html#info(java.lang.String)

Si c'est du debug il faudrais l'enlever, si c'est du log c'est mieux d'utiliser `Logger.info(msg)` https://docs.oracle.com/en/java/javase/21/docs/api/java.logging/java/util/logging/Logger.html#info(java.lang.String)
Author
Owner

hups !

hups !
Maxime marked this conversation as resolved
@ -49,1 +107,3 @@
public String encodePassword(String rawPassword){
return passwordEncoder.encode(rawPassword);
}
Owner

Huh?

Huh?
Author
Owner

nan javou useless un peu mdr

nan javou useless un peu mdr
Maxime marked this conversation as resolved
Maxime added 1 commit 2024-03-13 15:28:37 +01:00
updated tonitch's reviews
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m0s
Build and test backend / Test-backend (pull_request) Successful in 1m58s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 25s
4b1db883e2
LeoMoulin approved these changes 2024-03-14 19:39:48 +01:00
tonitch approved these changes 2024-03-14 21:50:47 +01:00
Maxime merged commit bb4ee784fa into master 2024-03-14 21:53:35 +01:00
Maxime deleted branch Max/Backend/UserControllerUpdate 2024-03-14 21:53:35 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PGL/Clyde#94
No description provided.