1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00
budibase/packages/client/src/api/auth.js
2020-11-19 18:39:22 +00:00

17 lines
365 B
JavaScript

import API from "./api"
/**
* Performs a log in request.
*/
export const logIn = async ({ username, password }) => {
if (!username) {
return API.error("Please enter your username")
}
if (!password) {
return API.error("Please enter your password")
}
return await API.post({
url: "/api/authenticate",
body: { username, password },
})
}