🚚 (mv) change dir name
change lib directory in features to models
This commit is contained in:
13
features/auth/models/getOauthProviderList.ts
Normal file
13
features/auth/models/getOauthProviderList.ts
Normal file
@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
import { api } from "@/shared/lib/ky/connector";
|
||||
|
||||
const getOauthProviderList = async () => {
|
||||
try {
|
||||
const res = await api.get(`auth/providers`);
|
||||
return res.json();
|
||||
} catch (error) {
|
||||
throw new Error("Failed to fetch OAuth providers", { cause: error });
|
||||
}
|
||||
};
|
||||
|
||||
export default getOauthProviderList;
|
||||
Reference in New Issue
Block a user