title: CRUD : update method doesn't work [Angular]
body: <p>I faced an issue with update method. I'm working on a spring boot angular project so update doesnt work on frontend my code looking logic can someone gie me an idea about this issue </p>
  
  <p><strong>user.service</strong></p>
  
  <pre><code> updateProfile(userData: SignUpData, id: string ): Observable&lt;any&gt; {
      return this.http.patch( API_URL + 'update/' + id, userData, httpOptions);
    }
  </code></pre>
  
  <p><strong>component.ts</strong></p>
  
  <pre><code>form: any = {};
    id: string;
    errorMessage = '';
    currentUser: any;
  
    constructor(private userservice: UserService, private route: ActivatedRoute, private router: Router, private token: TokenStorageService) { }
  
    ngOnInit() {
      this.currentUser = this.token.getUser();
    }
   onSubmit() {
  
      const {adresse1, ...rest} = this.form;
  
      const userData: SignUpData = {...rest, adresses: [adresse1]};
  
      this.userservice.updateProfile(userData, this.currentUser.id).subscribe(
        data =&gt; {
          console.log(data);
  
        },
        err =&gt; {
          this.errorMessage = err.error.message;
        }
      );
    }
  </code></pre>
  
  <p><strong>Interceptor.ts</strong></p>
  
  <pre><code>export class AuthInterceptor implements HttpInterceptor {
    constructor(private token: TokenStorageService) { }
  
    intercept(req: HttpRequest&lt;any&gt;, next: HttpHandler) {
      let authReq = req;
      const token = this.token.getToken();
      if (token != null) {
  
        authReq = req.clone({ headers: req.headers.set(TOKEN_HEADER_KEY, 'Bearer ' + token) });
  
  
      }
      return next.handle(authReq);
    }
  }
  
  export const authInterceptorProviders = [
    { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
  ];
  </code></pre>