Create urlHelper that contains getCoverUrl
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {API_CONFIG} from '../../config/api-config';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UrlHelperService {
|
||||
private readonly baseUrl = API_CONFIG.BASE_URL;
|
||||
|
||||
getCoverUrl(bookId: number, coverUpdatedOn?: string): string {
|
||||
return `${this.baseUrl}/v1/book/${bookId}/cover?${coverUpdatedOn || ''}`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user