Home timeline (#28)

* v. basic implementation of home timeline

* Go fmt ./...
This commit is contained in:
Tobi Smethurst
2021-05-21 23:04:59 +02:00
committed by GitHub
parent d839f27c30
commit 0df2e18cc0
14 changed files with 317 additions and 52 deletions

View File

@ -69,7 +69,7 @@ func (m *Module) OauthTokenMiddleware(c *gin.Context) {
if cid := ti.GetClientID(); cid != "" {
l.Tracef("authenticated client %s with bearer token, scope is %s", cid, ti.GetScope())
app := &gtsmodel.Application{}
if err := m.db.GetWhere([]db.Where{{Key: "client_id",Value: cid}}, app); err != nil {
if err := m.db.GetWhere([]db.Where{{Key: "client_id", Value: cid}}, app); err != nil {
l.Tracef("no app found for client %s", cid)
}
c.Set(oauth.SessionAuthorizedApplication, app)