mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-02-01 12:27:50 +01:00
Fix 403
This commit is contained in:
17
app/Helpers/WakatimeLogger.ts
Normal file
17
app/Helpers/WakatimeLogger.ts
Normal 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 }
|
||||
Reference in New Issue
Block a user