Refactor
This commit is contained in:
parent
898ef5bc39
commit
1038cac069
@ -73,7 +73,7 @@ export class AppFrameComponent
|
||||
PermissionType.SavedView
|
||||
)
|
||||
) {
|
||||
this.savedViewService.initialize()
|
||||
this.savedViewService.reload()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ describe(`Additional service tests for SavedViewService`, () => {
|
||||
let settingsService
|
||||
|
||||
it('should retrieve saved views and sort them', () => {
|
||||
service.initialize()
|
||||
service.reload()
|
||||
const req = httpTestingController.expectOne(
|
||||
`${environment.apiBaseUrl}${endpoint}/?page=1&page_size=100000`
|
||||
)
|
||||
@ -70,7 +70,7 @@ describe(`Additional service tests for SavedViewService`, () => {
|
||||
})
|
||||
|
||||
it('should gracefully handle errors', () => {
|
||||
service.initialize()
|
||||
service.reload()
|
||||
const req = httpTestingController.expectOne(
|
||||
`${environment.apiBaseUrl}${endpoint}/?page=1&page_size=100000`
|
||||
)
|
||||
|
@ -22,10 +22,6 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
|
||||
super(http, 'saved_views')
|
||||
}
|
||||
|
||||
public initialize() {
|
||||
this.reload()
|
||||
}
|
||||
|
||||
public list(
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
@ -49,7 +45,7 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
|
||||
)
|
||||
}
|
||||
|
||||
private reload() {
|
||||
public reload() {
|
||||
this.listAll().subscribe()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user