This commit is contained in:
2020-12-19 22:03:41 +01:00
parent 584ec42309
commit 56df09e56b
4 changed files with 43 additions and 9 deletions

View File

@@ -0,0 +1,17 @@
import axios from "axios";
import Env from '@ioc:Adonis/Core/Env'
async function login() {
await axios.post("https://wakatime.com/oauth/token",
{
client_id: Env.get('WAKATIME_USERNAME'),
client_secret: Env.get('WAKATIME_PASSWORD')
},
{
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
export { login }