Frontend until

This commit is contained in:
shamoon committed 2026-11-19 21:41:38 -08:00
1 parent 89fbbd8ba6
commit ef039e092a
2 files changed
+14 -1

No files matched your search

@@ -57,4 +57,11 @@ describe('RemoteVersionService', () => {
)
expect(req.request.method).toEqual('GET')
})
it('should pass until to release notes endpoint', () => {
subscription = service.getReleaseNotes('3.5.1', '3.6.0').subscribe()
httpTestingController.expectOne(
`${environment.apiBaseUrl}release_notes/?since=3.5.1&until=3.6.0`
)
})
})
@@ -34,11 +34,17 @@ export class RemoteVersionService {
)
}
public getReleaseNotes(since?: string): Observable<AppReleaseNotes> {
public getReleaseNotes(
since?: string,
until?: string
): Observable<AppReleaseNotes> {
let params = new HttpParams()
if (since) {
params = params.set('since', since)
}
if (until) {
params = params.set('until', until)
}
return this.http.get<AppReleaseNotes>(
`${environment.apiBaseUrl}release_notes/`,
{ params }