Files
artcraft/frontend/libs/api/src/lib/ModerationApi.ts
T
Michael Chung 1e42cf1dfa Using the new api manager to login
Fixing the login page
using the router instead of remix links.
2025-04-23 22:27:25 -04:00

43 lines
1.1 KiB
TypeScript

// import { ApiManager, ApiResponse } from "../apis/ApiManager";
// export class ModerationApi extends ApiManager {
// public async UpdateFeatureFlagsByToken({
// usernameOrToken,
// flags,
// }: {
// usernameOrToken: string;
// flags: string[];
// }): Promise<
// ApiResponse<{
// inference_job_token?: string;
// inference_job_token_type?: string;
// }>
// > {
// const endpoint = `${this.ApiTargets.BaseApi}/v1/moderation/user_feature_flags/${usernameOrToken}`;
// const body = {
// action: {
// AddFlags: {
// flags,
// },
// },
// };
// return this.post<
// { action: { AddFlags: { flags: string[] } } },
// { success?: boolean; BadInput?: string }
// >({
// endpoint,
// body: body,
// })
// .then((response) => ({
// success: response.success ?? false,
// errorMessage: response.BadInput,
// }))
// .catch((err) => ({
// success: false,
// errorMessage: err.message,
// }));
// }
// }