web: make sure naming matches backend

This commit is contained in:
Jens Langhammer
2020-12-16 23:02:43 +01:00
parent 2d9efe035e
commit 3b7bba5a62
35 changed files with 64 additions and 62 deletions

19
web/src/api/Providers.ts Normal file
View File

@ -0,0 +1,19 @@
import { DefaultClient, PBResponse, QueryArguments } from "./Client";
export class Provider {
pk: number;
name: string;
authorization_flow: string;
constructor() {
throw Error();
}
static get(slug: string): Promise<Provider> {
return DefaultClient.fetch<Provider>(["providers", "all", slug]);
}
static list(filter?: QueryArguments): Promise<PBResponse<Provider>> {
return DefaultClient.fetch<PBResponse<Provider>>(["providers", "all"], filter);
}
}