API Refactor #3504
No reviewers
Labels
No labels
BE Request
Backlog
Better behavior
Blocked by deps
Bug
Code Review
Discussion
Doing
Feature Request / Enhancement
In the shining bright future maybe
It's complicated
MS Edge
Mememoon (or other niche browsers)
Missing API
Missing feature
Missing l10n/i18n
NL1
NL2
NL4
Need to verify on develop
RELEASE BLOCKER
Reassign or Close
Refactor
Regression
Safari
To Do
User story
Waiting on godot
accessibility
better documentation
chore
confirmed
easy ticket
incident
l10n update
mastoapi
mobile
needs design
needs-info
needs-review
stupid
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pleroma/pleroma-fe!3504
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "api-refactor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
BackendInteractorServiceis no more, instead all requests are done by importing API call and passing singleton credentials taken from OAuth store.promisedRequest:StatusCodeErrorand it's handled in.catch()block instead of relying on "seemingly ok" response witherror(s) field.throw new Error(oldError)hides the original stack and extra infoparamsString()function that takes an object (orMap) and turns it into a query param string i.e.?foo=bar&baz=laznullandundefinedgets dropped?a[]=1&a[]=2)formDataswitches over to form-data mode.Content-TypeandContent-Lengthwhen parsing response.datafield,responseis also included (for extracting data from headers)public.js- publicly accessible stuff, i.e. user profiles, conversations. Authorization is optional but still passed just in case (i.e. loading locked conversations).user.js- stuff that guaranteed to require authorizationadmin.js- administrative stuff, i.e. moderation and configurationoauth.js- OAuth stuff (moved from/new_api)websocket.js- MastoAPI websocket stuff.timelines.js- timelines and their fetcherschats.js- Pleroma Chatsmfa.js- MFA (moved from/new_api)promisedRequests are mostly-static stuff like emoji fetching, nodeinfo etc., will probably get changed to usepromisedRequestlater.Overall the development should be a bit more consistent and cleaner now. Unfortunately code-splitting doesn't bring much benefit for chunking, but I guess every little bit matters.
MR is a bit cross-polluted from #3505, sorry.
@ -28,6 +31,7 @@ const UserReportingModal = {return !!this.$store.state.users.currentUser},isOpen() {console.log(this.reportModal)console.log
self-review pass 2