Updates some Python dependencies and the hooks

This commit is contained in:
Trenton H
2023-07-20 11:02:33 -07:00
parent 2f149eac9d
commit 8aa5ecde62
17 changed files with 371 additions and 350 deletions

View File

@@ -2,7 +2,7 @@ import { ObjectWithId } from 'src/app/data/object-with-id'
import { AbstractPaperlessService } from './abstract-paperless-service'
export abstract class AbstractNameFilterService<
T extends ObjectWithId
T extends ObjectWithId,
> extends AbstractPaperlessService<T> {
listFiltered(
page?: number,

View File

@@ -8,7 +8,10 @@ import { environment } from 'src/environments/environment'
export abstract class AbstractPaperlessService<T extends ObjectWithId> {
protected baseUrl: string = environment.apiBaseUrl
constructor(protected http: HttpClient, private resourceName: string) {}
constructor(
protected http: HttpClient,
private resourceName: string
) {}
protected getResourceUrl(id: number = null, action: string = null): string {
let url = `${this.baseUrl}${this.resourceName}/`

View File

@@ -9,7 +9,10 @@ import { AbstractNameFilterService } from './abstract-name-filter-service'
providedIn: 'root',
})
export class GroupService extends AbstractNameFilterService<PaperlessGroup> {
constructor(http: HttpClient, private permissionService: PermissionsService) {
constructor(
http: HttpClient,
private permissionService: PermissionsService
) {
super(http, 'groups')
}

View File

@@ -9,7 +9,10 @@ import { AbstractNameFilterService } from './abstract-name-filter-service'
providedIn: 'root',
})
export class UserService extends AbstractNameFilterService<PaperlessUser> {
constructor(http: HttpClient, private permissionService: PermissionsService) {
constructor(
http: HttpClient,
private permissionService: PermissionsService
) {
super(http, 'users')
}