mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 12:36:53 +00:00
Frontend until
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -57,4 +57,11 @@ describe('RemoteVersionService', () => {
|
|||||||
)
|
)
|
||||||
expect(req.request.method).toEqual('GET')
|
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()
|
let params = new HttpParams()
|
||||||
if (since) {
|
if (since) {
|
||||||
params = params.set('since', since)
|
params = params.set('since', since)
|
||||||
}
|
}
|
||||||
|
if (until) {
|
||||||
|
params = params.set('until', until)
|
||||||
|
}
|
||||||
return this.http.get<AppReleaseNotes>(
|
return this.http.get<AppReleaseNotes>(
|
||||||
`${environment.apiBaseUrl}release_notes/`,
|
`${environment.apiBaseUrl}release_notes/`,
|
||||||
{ params }
|
{ params }
|
||||||
|
|||||||
Reference in new issue
Block a user