refactor: migrate authentication and signup flow to use external API and improve type safety

This commit is contained in:
2025-01-24 11:42:38 +05:00
parent 8ffabb1fcb
commit 0fd269df31
9 changed files with 96 additions and 73 deletions
+10
View File
@@ -0,0 +1,10 @@
"use server";
import type { Atoll, DataResponse } from "@/lib/backend-types";
export async function getAtollsWithIslands(): Promise<DataResponse<Atoll>> {
const response = await fetch(
`${process.env.SARLINK_API_BASE_URL}/api/auth/atolls`,
);
return response.json();
}