2018-01-13 14:19:51 -08:00
|
|
|
import { get } from '../ajax'
|
2018-01-18 21:52:58 -08:00
|
|
|
import { basename } from './utils'
|
2018-01-13 14:19:51 -08:00
|
|
|
|
2018-01-13 20:07:11 -08:00
|
|
|
export function getThisUserAccount(instanceName, accessToken) {
|
2018-01-18 21:52:58 -08:00
|
|
|
let url = `${basename(instanceName)}/api/v1/accounts/verify_credentials`
|
2018-01-13 14:19:51 -08:00
|
|
|
return get(url, {
|
|
|
|
'Authorization': `Bearer ${accessToken}`
|
|
|
|
})
|
|
|
|
}
|