add API authorization

This commit is contained in:
Henry
2023-04-29 18:01:40 +01:00
parent 419d9634b4
commit 2a98c9510f
12 changed files with 967 additions and 111 deletions
+16
View File
@@ -0,0 +1,16 @@
import client from './client'
const getAllAPIKeys = () => client.get('/apikey')
const createNewAPI = (body) => client.post(`/apikey`, body)
const updateAPI = (id, body) => client.put(`/apikey/${id}`, body)
const deleteAPI = (id) => client.delete(`/apikey/${id}`)
export default {
getAllAPIKeys,
createNewAPI,
updateAPI,
deleteAPI
}
+1 -1
View File
@@ -1,6 +1,6 @@
import client from './client'
const sendMessageAndGetPrediction = (id, input) => client.post(`/prediction/${id}`, input)
const sendMessageAndGetPrediction = (id, input) => client.post(`/internal-prediction/${id}`, input)
export default {
sendMessageAndGetPrediction