Skip to content
Snippets Groups Projects
Select Git revision
  • 7fc2994e23cb3d9e4ef9aab95d66d104eed46ca4
  • main default protected
  • jw_sonar
  • v6.0.0 protected
  • bedran_exercise-list
  • ask-user-to-delete-exercises-on-duplicates
  • update-dependencies
  • jw_sonar_backup
  • add_route_assignments
  • 6.0.0-dev
  • 5.0.1
  • 5.0.0
  • 4.1.0
  • 4.0.0
  • 3.5.3
  • 3.5.2
  • 3.5.1
  • 3.5.0
  • 3.4.2
  • 3.4.1
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.3
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.1
  • 3.0.0
29 results

BaseRoutes.ts

Blame
  • assignment.service.ts 615 B
    import { HttpClient } from '@angular/common/http';
    import { Injectable } from '@angular/core';
    import { Assignment } from 'app/model/assignment';
    import { Observable } from 'rxjs';
    
    @Injectable({
      providedIn: 'root'
    })
    export class AssignmentService {
      private baseUrl = 'http://192.168.1.156:3000';
    
      constructor(private http: HttpClient) {}
      
      getAssignments(): Observable<Assignment[]> {
        return this.http.get<Assignment[]>(`${this.baseUrl}/assignments`);
      }
      
      delAssignments(id: number): Observable<any> {
        const url = `${this.baseUrl}/assignments/${id}`;
        return this.http.delete(url);
      }
    }