Added more userstory stuff (teamarbeit)
This commit is contained in:
parent
17b1872ebd
commit
c718943af3
@ -6,8 +6,8 @@ import { UserstoryListComponent } from './userstory-list/userstory-list.componen
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '/tasks', component: TaskListComponent },
|
||||
{ path: '/userstories', component: UserstoryListComponent }
|
||||
{ path: 'tasks', component: TaskListComponent },
|
||||
{ path: 'userstories', component: UserstoryListComponent }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@ -17,7 +17,9 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
declarations: [
|
||||
AppComponent,
|
||||
TaskListComponent,
|
||||
TaskFormComponent
|
||||
TaskFormComponent,
|
||||
UserstoryListComponent,
|
||||
UserstoryFormComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
@ -37,28 +37,28 @@ export class BackendService {
|
||||
|
||||
|
||||
|
||||
public getTasks(): Observable<HttpResponse<ScrumTask[]>> {
|
||||
const url = `${environment.apiUrl}/tasks`;
|
||||
return this.httpClient.get<ScrumTask[]>(url, { observe: 'response' });
|
||||
public getUserstories(): Observable<HttpResponse<ScrumUserstory[]>> {
|
||||
const url = `${environment.apiUrl}/userstories`;
|
||||
return this.httpClient.get<ScrumUserstory[]>(url, { observe: 'response' });
|
||||
}
|
||||
|
||||
public getTask(id: number): Observable<HttpResponse<ScrumTask>> {
|
||||
const url = `${environment.apiUrl}/tasks/${id}`;
|
||||
return this.httpClient.get<ScrumTask>(url, { observe: 'response' });
|
||||
public getUserstory(id: number): Observable<HttpResponse<ScrumUserstory>> {
|
||||
const url = `${environment.apiUrl}/userstories/${id}`;
|
||||
return this.httpClient.get<ScrumUserstory>(url, { observe: 'response' });
|
||||
}
|
||||
|
||||
public postTask(task: ScrumTask): Observable<HttpResponse<ScrumTask>> {
|
||||
const url = `${environment.apiUrl}/tasks`;
|
||||
return this.httpClient.post<ScrumTask>(url, task, { observe: 'response' });
|
||||
public postUserstory(userstory: ScrumUserstory): Observable<HttpResponse<ScrumUserstory>> {
|
||||
const url = `${environment.apiUrl}/userstories`;
|
||||
return this.httpClient.post<ScrumUserstory>(url, userstory, { observe: 'response' });
|
||||
}
|
||||
|
||||
public putTask(task: ScrumTask): Observable<HttpResponse<any>> {
|
||||
const url = `${environment.apiUrl}/tasks/${task.id}`;
|
||||
return this.httpClient.put(url, task, { observe: 'response' });
|
||||
public putUserstory(userstory: ScrumUserstory): Observable<HttpResponse<any>> {
|
||||
const url = `${environment.apiUrl}/userstories/${userstory.id}`;
|
||||
return this.httpClient.put(url, userstory, { observe: 'response' });
|
||||
}
|
||||
|
||||
public deleteTask(task: ScrumTask): Observable<HttpResponse<any>> {
|
||||
const url = `${environment.apiUrl}/tasks/${task.id}`;
|
||||
public deleteUserstory(userstory: ScrumUserstory): Observable<HttpResponse<any>> {
|
||||
const url = `${environment.apiUrl}/userstories/${userstory.id}`;
|
||||
return this.httpClient.delete(url, {observe: 'response'});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user