mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-21 02:11:35 +03:00
0ce9c8ffcd
* test(useApiKeyConfig): add unit tests * test(BackendConfig): add unit tests
10 lines
245 B
TypeScript
10 lines
245 B
TypeScript
import { AxiosInstance } from "axios";
|
|
|
|
export const createApiKey = async (
|
|
axiosInstance: AxiosInstance
|
|
): Promise<string> => {
|
|
const response = await axiosInstance.post<{ api_key: string }>("/api-key");
|
|
|
|
return response.data.api_key;
|
|
};
|