website refactor
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { AdminService } from '@/lib/services/admin/AdminService';
|
||||
import { Result } from '@/lib/contracts/Result';
|
||||
import { MutationError, mapToMutationError } from '@/lib/contracts/mutations/MutationError';
|
||||
import { Mutation } from '@/lib/contracts/mutations/Mutation';
|
||||
|
||||
/**
|
||||
* UpdateUserStatusMutation
|
||||
@@ -13,7 +14,7 @@ import { MutationError, mapToMutationError } from '@/lib/contracts/mutations/Mut
|
||||
*
|
||||
* Pattern: Server Action → Mutation → Service → API Client
|
||||
*/
|
||||
export class UpdateUserStatusMutation {
|
||||
export class UpdateUserStatusMutation implements Mutation<{ userId: string; status: string }, void, MutationError> {
|
||||
async execute(input: { userId: string; status: string }): Promise<Result<void, MutationError>> {
|
||||
try {
|
||||
// Manual construction: Service creates its own dependencies
|
||||
|
||||
Reference in New Issue
Block a user