Create urlHelper that contains getCoverUrl

This commit is contained in:
aditya.chandel
2025-01-18 23:22:53 -07:00
parent 817ea3ddfa
commit 6beae77c35
13 changed files with 34 additions and 27 deletions
@@ -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 || ''}`;
}
}