refactor: improve formatting, type safety, and component organization
- Adjusted inconsistent formatting for better readability across components and services. - Enhanced type safety by adding placeholders for ignored error parameters and improving types across services. - Improved component organization by reordering imports consistently and applying formatting updates in UI components.
This commit is contained in:
@@ -18,7 +18,10 @@ export const adminService = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
updateReportStatus: async (reportId: string, status: ReportStatus): Promise<void> => {
|
||||
updateReportStatus: async (
|
||||
reportId: string,
|
||||
status: ReportStatus,
|
||||
): Promise<void> => {
|
||||
await api.patch(`/reports/${reportId}/status`, { status });
|
||||
},
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import api from "@/lib/api";
|
||||
import type { LoginResponse, RegisterPayload, TwoFactorSetupResponse } from "@/types/auth";
|
||||
import type {
|
||||
LoginResponse,
|
||||
RegisterPayload,
|
||||
TwoFactorSetupResponse,
|
||||
} from "@/types/auth";
|
||||
|
||||
export const AuthService = {
|
||||
async login(email: string, password: string): Promise<LoginResponse> {
|
||||
@@ -31,7 +35,9 @@ export const AuthService = {
|
||||
},
|
||||
|
||||
async setup2fa(): Promise<TwoFactorSetupResponse> {
|
||||
const { data } = await api.post<TwoFactorSetupResponse>("/users/me/2fa/setup");
|
||||
const { data } = await api.post<TwoFactorSetupResponse>(
|
||||
"/users/me/2fa/setup",
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user