mirror of https://github.com/jlelse/GoBlog
Fixes
This commit is contained in:
parent
3a4338ded2
commit
902f0f55e8
1
http.go
1
http.go
|
@ -144,6 +144,7 @@ func buildHandler() (http.Handler, error) {
|
|||
// ActivityPub and stuff
|
||||
if appConfig.ActivityPub.Enabled {
|
||||
r.Post("/activitypub/inbox/{blog}", apHandleInbox)
|
||||
r.Post("/activitypub/{blog}/inbox", apHandleInbox)
|
||||
r.Get("/.well-known/webfinger", apHandleWebfinger)
|
||||
r.Get("/.well-known/host-meta", handleWellKnownHostMeta)
|
||||
}
|
||||
|
|
|
@ -268,8 +268,10 @@ func (data *indieAuthData) saveToken() (err error) {
|
|||
|
||||
func verifyIndieAuthToken(token string) (data *indieAuthData, err error) {
|
||||
token = strings.ReplaceAll(token, "Bearer ", "")
|
||||
data = &indieAuthData{}
|
||||
row, err := appDbQueryRow("select time, token, me, client, scope from indieauthtoken where token = ?", token)
|
||||
data = &indieAuthData{
|
||||
Scopes: []string{},
|
||||
}
|
||||
row, err := appDbQueryRow("select time, token, me, client, scope from indieauthtoken where token = @token", sql.Named("token", token))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue