Commit Graph

7 Commits

Author SHA1 Message Date
Julian Lam
20bb9c7ec8 fix: csrf token only on non-GET routes 2020-10-14 14:02:03 -04:00
Barış Soner Uşaklı
3673accdb8 refactor: api module
only return promise if callback is undefined
dont append baseUrl if url already starts with api
correctly handle writeapi readapi response for data/error
remove unused onError
dont append empty ? to url for get routes
2020-10-14 11:05:50 -04:00
Julian Lam
a784d10fff refactor: api module returns promise, error-first cb if cb passed in
no more separate onSuccess onError callbacks

/cc @baris
2020-10-14 10:02:02 -04:00
Julian Lam
1e07886f30 feat: require csrf token if not using bearer token 2020-10-13 16:58:44 -04:00
Julian Lam
3ea1aa4780 refactor(writeapi): update route prefix to api/v3, default error option 2020-10-08 15:33:10 -04:00
Julian Lam
a905d7f022 refactor: rewrite modules/api.js in AMD style 2020-10-08 15:33:10 -04:00
Julian Lam
d044c3223e feat(writeapi): abstracted ajax calls out to new api module 2020-10-08 15:33:10 -04:00