mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-17 05:15:00 +00:00
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
|
// ActivityPub and stuff
|
||||||
if appConfig.ActivityPub.Enabled {
|
if appConfig.ActivityPub.Enabled {
|
||||||
r.Post("/activitypub/inbox/{blog}", apHandleInbox)
|
r.Post("/activitypub/inbox/{blog}", apHandleInbox)
|
||||||
|
r.Post("/activitypub/{blog}/inbox", apHandleInbox)
|
||||||
r.Get("/.well-known/webfinger", apHandleWebfinger)
|
r.Get("/.well-known/webfinger", apHandleWebfinger)
|
||||||
r.Get("/.well-known/host-meta", handleWellKnownHostMeta)
|
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) {
|
func verifyIndieAuthToken(token string) (data *indieAuthData, err error) {
|
||||||
token = strings.ReplaceAll(token, "Bearer ", "")
|
token = strings.ReplaceAll(token, "Bearer ", "")
|
||||||
data = &indieAuthData{}
|
data = &indieAuthData{
|
||||||
row, err := appDbQueryRow("select time, token, me, client, scope from indieauthtoken where token = ?", token)
|
Scopes: []string{},
|
||||||
|
}
|
||||||
|
row, err := appDbQueryRow("select time, token, me, client, scope from indieauthtoken where token = @token", sql.Named("token", token))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user