mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-07 21:24:24 +08:00
[local-sync] Prefer promises over success
option for api requests
Summary: Companion D3869 Test Plan: manual Reviewers: halla, spang, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D3868
This commit is contained in:
parent
9a3470bacb
commit
e6afea45a0
1 changed files with 7 additions and 7 deletions
|
@ -38,16 +38,16 @@ class SyncMetricsReporter {
|
|||
path: `/ingest-metrics`,
|
||||
method: 'POST',
|
||||
body: info,
|
||||
error: () => {
|
||||
logger.warn("Metrics Collector: Submission Failed.", info);
|
||||
},
|
||||
accountId: AccountStore.accountForEmail(info.emailAddress).id,
|
||||
success: () => {
|
||||
logger.log(info, "Metrics Collector: Submitted.", info);
|
||||
},
|
||||
},
|
||||
});
|
||||
req.run();
|
||||
req.run()
|
||||
.then(() => {
|
||||
logger.log(info, "Metrics Collector: Submitted.", info);
|
||||
})
|
||||
.catch(() => {
|
||||
logger.warn("Metrics Collector: Submission Failed.", info);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue