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

18 lines
365 B
JavaScript
Raw Normal View History

import API from "./api"
2020-11-12 01:25:50 +13:00
/**
* Performs a log in request.
*/
export const logIn = async ({ username, password }) => {
if (!username) {
return API.error("Please enter your username")
2020-11-12 01:25:50 +13:00
}
if (!password) {
return API.error("Please enter your password")
2020-11-12 01:25:50 +13:00
}
return await API.post({
2020-11-12 01:25:50 +13:00
url: "/api/authenticate",
body: { username, password },
})
}