You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pastebin/api.js

16 lines
317 B
JavaScript

// for development, to use api-stub, just import it here and export it at the end;
// it's a one-liner that switches from stub to actual api
const api = {};
let prefix = "/api";
api.post = function(url, body){
return m.request({
method: 'POST',
url: prefix+url,
body
});
};
export default api;