mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[performance] add user cache and database (#879)
* go fmt * add + use user cache and database * fix import * update tests * remove unused relation
This commit is contained in:
@ -40,8 +40,8 @@ func (p *processor) AuthorizeStreamingRequest(ctx context.Context, accessToken s
|
||||
return nil, gtserror.NewErrorUnauthorized(err)
|
||||
}
|
||||
|
||||
user := >smodel.User{}
|
||||
if err := p.db.GetByID(ctx, uid, user); err != nil {
|
||||
user, err := p.db.GetUserByID(ctx, uid)
|
||||
if err != nil {
|
||||
if err == db.ErrNoEntries {
|
||||
err := fmt.Errorf("no user found for validated uid %s", uid)
|
||||
return nil, gtserror.NewErrorUnauthorized(err)
|
||||
|
Reference in New Issue
Block a user