Skip to content

Commit

Permalink
fixed 'bearer' not being removed from token
Browse files Browse the repository at this point in the history
  • Loading branch information
Gugi-Games committed Oct 13, 2024
1 parent 901916b commit 30e08b5
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public Appointment getAppointment(
@ContextValue String token,
@Argument long id
) {
token = token.substring(7);
try {
return appointmentService.getAppointment(token, id);

} catch (Throwable t) {
Class<? extends Throwable> tc = t.getClass();
return null;
Expand Down Expand Up @@ -83,8 +83,9 @@ public ResponseEntity<?> editAppointment(
// @Argument Select Prompt → f.E. medical industry: Untersuchung, Operation,
@Argument String description,
@Argument String location,
@Argument String status) {

@Argument String status
) {
token = token.substring(7);
try {
appointmentService.editAppointment(token, id, from, to, clientId, assigneeId, description, location, AppointmentStatus.valueOf(status));
return ResponseEntity.ok().build();
Expand All @@ -107,8 +108,9 @@ public ResponseEntity<?> editAppointment(
@MutationMapping
public ResponseEntity<?> deleteAppointment(
@ContextValue String token,
@Argument long id) {

@Argument long id
) {
token = token.substring(7);
try {
appointmentService.deleteAppointment(token, id);
return ResponseEntity.ok().build();
Expand Down

0 comments on commit 30e08b5

Please sign in to comment.