Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
800 B

const crypto = require("../nodeCrypto");
const {getAppApis} = require("budibase-core");
module.exports.getApisWithFullAccess = async (datastore) => {
const bb = await getAppApis(
datastore,
null, null, null,
crypto
);
bb.withFullAccess();
return bb;
};
module.exports.getApisForUser = async (datastore, username, password) => {
const bb = await getAppApis(
datastore,
null, null, null,
crypto
);
await bb.authenticateAs(username, password);
return bb;
}
module.exports.getApisForSession = async (datastore, session) => {
const user = JSON.parse(session.user_json);
const bb = await getAppApis(
datastore,
null, null, null,
crypto
);
bb.asUser(user);
return bb;
}