mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-23 08:20:27 +01:00
18 lines
375 B
TypeScript
18 lines
375 B
TypeScript
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 }
|