feat: Convert all app files to JS
This commit is contained in:
14
packages/backend/src/apps/todoist/auth/verify-credentials.js
Normal file
14
packages/backend/src/apps/todoist/auth/verify-credentials.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const verifyCredentials = async ($) => {
|
||||
const { data } = await $.http.post(`${$.app.baseUrl}/oauth/access_token`, {
|
||||
client_id: $.auth.data.clientId,
|
||||
client_secret: $.auth.data.clientSecret,
|
||||
code: $.auth.data.code,
|
||||
});
|
||||
|
||||
await $.auth.set({
|
||||
tokenType: data.token_type,
|
||||
accessToken: data.access_token,
|
||||
});
|
||||
};
|
||||
|
||||
export default verifyCredentials;
|
||||
Reference in New Issue
Block a user