richlai commited on
Commit
83f6a8c
·
1 Parent(s): 4d270f8

fix api.js

Browse files
Files changed (1) hide show
  1. 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 (username: string, password: string): Promise<string> => {
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:string) => {
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: {