mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-15 06:06:35 +08:00
ddcd097c9b
Summary: It turns out we don't ever use the /account API endpoint. The GET /accounts endpoint was designed to query all accounts connected to a system for old K2, but we don't use that anymore. The environment variable protecting the endpoint isn't set anywhere. We used to `GET /account` from the N1 AccountStore to attempt to refresh the health of the accounts. The accompianing diff to this one makes that obsolete. We never need to query for the account health since the sync loop pushes it to us through `Actions.updateAccount`. We also never `DELETE /account` because our local-sync runs a function called `ensureK2Consistency` that compares its DB against the Nylas Mail `AccountStore`. This file has always been a huge source of confusion to me and a massive red herring for anyone trying to understand how the account system work. The accompyaning diff has more comments explaining the existing system Depends on https://phab.nylas.com/D3770 Test Plan: Manually boot N1. Ensure existing account works. Add a new account. Remove an account. Open the developer tools and check that all the tabs still work. Lots of grepping through the code base. Reviewers: halla, mark, juan, khamidou Reviewed By: juan, khamidou Differential Revision: https://phab.nylas.com/D3769 |
||
---|---|---|
.. | ||
images | ||
spec | ||
src | ||
stylesheets | ||
main.es6 | ||
package.json |