mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-12-01 06:17:38 -07:00
[mastodon-client] Allow unauthorized uses to access /accounts/:id/statuses
This commit is contained in:
parent
f6d0183668
commit
f8be4533df
1 changed files with 1 additions and 6 deletions
|
@ -145,12 +145,7 @@ export function apiAccountMastodon(router: Router): void {
|
||||||
async (ctx) => {
|
async (ctx) => {
|
||||||
try {
|
try {
|
||||||
const auth = await authenticate(ctx.headers.authorization, null);
|
const auth = await authenticate(ctx.headers.authorization, null);
|
||||||
const user = auth[0] ?? undefined;
|
const user = auth[0] ?? null;
|
||||||
|
|
||||||
if (!user) {
|
|
||||||
ctx.status = 401;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const userId = convertId(ctx.params.id, IdType.IceshrimpId);
|
const userId = convertId(ctx.params.id, IdType.IceshrimpId);
|
||||||
const cache = UserHelpers.getFreshAccountCache();
|
const cache = UserHelpers.getFreshAccountCache();
|
||||||
|
|
Loading…
Reference in a new issue