File tree Expand file tree Collapse file tree 14 files changed +103
-25
lines changed
Expand file tree Collapse file tree 14 files changed +103
-25
lines changed Original file line number Diff line number Diff line change 1- import { Organization } from "./Organisation " ;
2- import { User } from "./User " ;
1+ import { Organization } from "./organisation " ;
2+ import { User } from "./user " ;
33
44export interface Article {
55 type_of : string ;
File renamed without changes.
Original file line number Diff line number Diff line change 1+ export interface Tag {
2+ id : number ;
3+ name : string ;
4+ bg_color_hex : string ;
5+ text_color_hex : string ;
6+ }
File renamed without changes.
Original file line number Diff line number Diff line change 1111 </ div >
1212 </ div >
1313 < div class ="article-body ">
14- <!-- Todo check spacing is 36px but should be 30px -->
1514 < span #ref >
1615 < ng-content > </ ng-content >
1716 </ span >
Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ export class ArticleApiService {
1111 constructor ( private http : HttpClient ) { }
1212
1313 getArticles ( ) : Observable < Article [ ] > {
14- return this . http . get < Article [ ] > ( `${ environment . baseApi } articles` ) ;
14+ return this . http . get < Article [ ] > ( `${ environment . baseApi } / articles` ) ;
1515 }
1616}
Original file line number Diff line number Diff line change 1- import { HttpErrorResponse } from '@angular/common/http' ;
21import { Injectable } from '@angular/core' ;
32import { ComponentStore , tapResponse } from '@ngrx/component-store' ;
43import { Article } from '../../../../models/articles' ;
Original file line number Diff line number Diff line change 1+ import { TestBed } from '@angular/core/testing' ;
2+
3+ import { TagsApiService } from './tags-api.service' ;
4+
5+ describe ( 'TagsApiService' , ( ) => {
6+ let service : TagsApiService ;
7+
8+ beforeEach ( ( ) => {
9+ TestBed . configureTestingModule ( { } ) ;
10+ service = TestBed . inject ( TagsApiService ) ;
11+ } ) ;
12+
13+ it ( 'should be created' , ( ) => {
14+ expect ( service ) . toBeTruthy ( ) ;
15+ } ) ;
16+ } ) ;
Original file line number Diff line number Diff line change 1+ import { HttpClient } from '@angular/common/http' ;
2+ import { Injectable } from '@angular/core' ;
3+ import { Observable } from 'rxjs' ;
4+ import { Tag } from 'src/app/models/tags' ;
5+ import { environment } from 'src/environments/environment' ;
6+
7+ @Injectable ( {
8+ providedIn : 'root'
9+ } )
10+ export class TagsApiService {
11+
12+ constructor ( private http : HttpClient ) { }
13+
14+ getTags ( ) : Observable < Tag [ ] > {
15+ return this . http . get < Tag [ ] > ( `${ environment . baseApi } /tags` ) ;
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ import { TestBed } from '@angular/core/testing' ;
2+
3+ import { TagsStore } from './tags.store' ;
4+
5+ describe ( 'TagsService' , ( ) => {
6+ let service : TagsStore ;
7+
8+ beforeEach ( ( ) => {
9+ TestBed . configureTestingModule ( { } ) ;
10+ service = TestBed . inject ( TagsStore ) ;
11+ } ) ;
12+
13+ it ( 'should be created' , ( ) => {
14+ expect ( service ) . toBeTruthy ( ) ;
15+ } ) ;
16+ } ) ;
You can’t perform that action at this time.
0 commit comments