mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-22 23:32:55 -06:00
Go fmt ./...
This commit is contained in:
parent
c16b8325ae
commit
762dfe4b7e
7 changed files with 53 additions and 51 deletions
|
|
@ -69,7 +69,7 @@ func (m *Module) OauthTokenMiddleware(c *gin.Context) {
|
||||||
if cid := ti.GetClientID(); cid != "" {
|
if cid := ti.GetClientID(); cid != "" {
|
||||||
l.Tracef("authenticated client %s with bearer token, scope is %s", cid, ti.GetScope())
|
l.Tracef("authenticated client %s with bearer token, scope is %s", cid, ti.GetScope())
|
||||||
app := >smodel.Application{}
|
app := >smodel.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)
|
l.Tracef("no app found for client %s", cid)
|
||||||
}
|
}
|
||||||
c.Set(oauth.SessionAuthorizedApplication, app)
|
c.Set(oauth.SessionAuthorizedApplication, app)
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,14 @@ const (
|
||||||
|
|
||||||
// ErrNoEntries is to be returned from the DB interface when no entries are found for a given query.
|
// ErrNoEntries is to be returned from the DB interface when no entries are found for a given query.
|
||||||
type ErrNoEntries struct{}
|
type ErrNoEntries struct{}
|
||||||
|
|
||||||
func (e ErrNoEntries) Error() string {
|
func (e ErrNoEntries) Error() string {
|
||||||
return "no entries"
|
return "no entries"
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrAlreadyExists is to be returned from the DB interface when an entry already exists for a given query or its constraints.
|
// ErrAlreadyExists is to be returned from the DB interface when an entry already exists for a given query or its constraints.
|
||||||
type ErrAlreadyExists struct{}
|
type ErrAlreadyExists struct{}
|
||||||
|
|
||||||
func (e ErrAlreadyExists) Error() string {
|
func (e ErrAlreadyExists) Error() string {
|
||||||
return "already exists"
|
return "already exists"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue