fix api.js
Browse files- frontend/src/api.js +2 -2
frontend/src/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
const API_URL = 'http://localhost:8000';
|
| 2 |
|
| 3 |
-
export const login = async (
|
| 4 |
const response = await fetch(`${API_URL}/api/token`, {
|
| 5 |
method: 'POST',
|
| 6 |
headers: {
|
|
@@ -20,7 +20,7 @@ export const login = async (username: string, password: string): Promise<string>
|
|
| 20 |
return data.access_token;
|
| 21 |
};
|
| 22 |
|
| 23 |
-
export const clearMessages = async (token
|
| 24 |
const response = await fetch(`${API_URL}/api/clear_memory`, {
|
| 25 |
method: 'POST',
|
| 26 |
headers: {
|
|
|
|
| 1 |
const API_URL = 'http://localhost:8000';
|
| 2 |
|
| 3 |
+
export const login = async (string, password) => {
|
| 4 |
const response = await fetch(`${API_URL}/api/token`, {
|
| 5 |
method: 'POST',
|
| 6 |
headers: {
|
|
|
|
| 20 |
return data.access_token;
|
| 21 |
};
|
| 22 |
|
| 23 |
+
export const clearMessages = async (token) => {
|
| 24 |
const response = await fetch(`${API_URL}/api/clear_memory`, {
|
| 25 |
method: 'POST',
|
| 26 |
headers: {
|