core: add providers/types endpoint
This commit is contained in:
		| @ -1,5 +1,11 @@ | ||||
| import { BaseInheritanceModel, DefaultClient, AKResponse, QueryArguments } from "./Client"; | ||||
|  | ||||
| export interface TypeCreate { | ||||
|     name: string; | ||||
|     description: string; | ||||
|     link: string; | ||||
| } | ||||
|  | ||||
| export class Provider implements BaseInheritanceModel { | ||||
|     pk: number; | ||||
|     name: string; | ||||
| @ -24,6 +30,10 @@ export class Provider implements BaseInheritanceModel { | ||||
|         return DefaultClient.fetch<AKResponse<Provider>>(["providers", "all"], filter); | ||||
|     } | ||||
|  | ||||
|     static getTypes(): Promise<TypeCreate[]> { | ||||
|         return DefaultClient.fetch<TypeCreate[]>(["providers", "all", "types"]); | ||||
|     } | ||||
|  | ||||
|     static adminUrl(rest: string): string { | ||||
|         return `/administration/providers/${rest}`; | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer