top of page
Forum Posts
Rodrigo Mascarenhas
Mar 13, 2019
In Coding with Velo
Hello everyone! I was wondering how to expose api from my wix website that contains all the booked services, including whether each service is paid or not, customer's email, phone number e etc... the same information we have when we access the Booking Calendar through the Wix dashboard. Thanks for yalls time!
0
0
19
Rodrigo Mascarenhas
Feb 17, 2019
In Coding with Velo
I tried to expose an http get function in order to get the list of users registered to my website, and possibly use it in an external application. I will use this application to allow registered users to book online directly through the said app. However, when I test my recently created http-function, I get an error. This is my code for the function: export function get_usersQuery(request) {
const options = {
headers: {
"Content-Type": "application/json"
}
};
return wixData.query("Members/PrivateMembersData").find().then( (results) => {
if (results.items.length > 0) {
options.body = {
"items": results.items
};
return ok(options);
}
}).catch( (error) => {
options.body = {
"error": `${error} this is that error that idk what it is`
}
return serverError(options);
});
} BTW: I am accessing the API correctly /_functions/usersQuery Can anyone help me? You guys are amazing already, helping me with this would be insanely awesome. Thanks in Advance
0
2
63
Rodrigo Mascarenhas
More actions
bottom of page