mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-05 13:23:08 +02:00
upd: remove Bearer from auth when looking up token
This commit is contained in:
parent
b57ec5e2eb
commit
2aa7c1ae34
1 changed files with 2 additions and 2 deletions
|
@ -256,8 +256,8 @@ export class MastodonApiServerService {
|
||||||
const client = getClient(BASE_URL, accessTokens); // we are using this here, because in private mode some info isnt
|
const client = getClient(BASE_URL, accessTokens); // we are using this here, because in private mode some info isnt
|
||||||
// displayed without being logged in
|
// displayed without being logged in
|
||||||
try {
|
try {
|
||||||
if (_request.files.length > 0) {
|
if (_request.files.length > 0 && accessTokens) {
|
||||||
const tokeninfo = await this.accessTokensRepository.findOneBy({ token: accessTokens });
|
const tokeninfo = await this.accessTokensRepository.findOneBy({ token: accessTokens.replace('Bearer ', '') });
|
||||||
console.error(tokeninfo);
|
console.error(tokeninfo);
|
||||||
if (tokeninfo && (_request.files as any)['avatar']) {
|
if (tokeninfo && (_request.files as any)['avatar']) {
|
||||||
const file = toSingleLast((_request.files as any)['avatar']);
|
const file = toSingleLast((_request.files as any)['avatar']);
|
||||||
|
|
Loading…
Reference in a new issue