Files
co-lite/solvway-admin-portal/app/lib/services/adminInterests.ts
T
ngqileandClaude Opus 5.5 8ce9fcf471 feat: portal password hints, company hint, interest and role delete, dashboard notes
- Login: company-code hint after an invalid-credentials failure with an empty company.
- Password forms show the active rules (label-first, count-safe) and tie hint and refusal to the input.
- Interests and roles: soft delete with confirm dialogs; deactivate now confirms too.
- Dashboard figure explanations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2026-12-02 02:59:44 +08:00

15 lines
631 B
TypeScript

import { apiGet, apiPost, apiPut, apiDelete } from "@/app/lib/clientApi";
import type { AdminInterestEntity } from "@/app/lib/types";
export async function listAdminInterests(): Promise<AdminInterestEntity[]> {
return apiGet<AdminInterestEntity[]>("/api/interests");
}
export async function saveAdminInterest(payload: AdminInterestEntity): Promise<AdminInterestEntity> {
return payload.id
? apiPut<AdminInterestEntity>(`/api/interests/${payload.id}`, payload)
: apiPost<AdminInterestEntity>("/api/interests", payload);
}
export const deleteAdminInterest = (id: number) => apiDelete<unknown>(`/api/interests/${id}`);