This commit is contained in:
shamoon 2024-09-10 12:58:44 -07:00
parent 898ef5bc39
commit 1038cac069
3 changed files with 4 additions and 8 deletions

View File

@ -73,7 +73,7 @@ export class AppFrameComponent
PermissionType.SavedView PermissionType.SavedView
) )
) { ) {
this.savedViewService.initialize() this.savedViewService.reload()
} }
} }

View File

@ -57,7 +57,7 @@ describe(`Additional service tests for SavedViewService`, () => {
let settingsService let settingsService
it('should retrieve saved views and sort them', () => { it('should retrieve saved views and sort them', () => {
service.initialize() service.reload()
const req = httpTestingController.expectOne( const req = httpTestingController.expectOne(
`${environment.apiBaseUrl}${endpoint}/?page=1&page_size=100000` `${environment.apiBaseUrl}${endpoint}/?page=1&page_size=100000`
) )
@ -70,7 +70,7 @@ describe(`Additional service tests for SavedViewService`, () => {
}) })
it('should gracefully handle errors', () => { it('should gracefully handle errors', () => {
service.initialize() service.reload()
const req = httpTestingController.expectOne( const req = httpTestingController.expectOne(
`${environment.apiBaseUrl}${endpoint}/?page=1&page_size=100000` `${environment.apiBaseUrl}${endpoint}/?page=1&page_size=100000`
) )

View File

@ -22,10 +22,6 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
super(http, 'saved_views') super(http, 'saved_views')
} }
public initialize() {
this.reload()
}
public list( public list(
page?: number, page?: number,
pageSize?: number, pageSize?: number,
@ -49,7 +45,7 @@ export class SavedViewService extends AbstractPaperlessService<SavedView> {
) )
} }
private reload() { public reload() {
this.listAll().subscribe() this.listAll().subscribe()
} }