mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-24 10:56:17 -06:00
move tokenauth to apiutil
This commit is contained in:
parent
f734a94c1c
commit
e3857b90bb
186 changed files with 226 additions and 427 deletions
|
|
@ -28,7 +28,6 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/id"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/log"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||
streampkg "github.com/superseriousbusiness/gotosocial/internal/stream"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
|
@ -187,7 +186,7 @@ func (m *Module) StreamGETHandler(c *gin.Context) {
|
|||
|
||||
// No explicit token was provided:
|
||||
// try regular oauth as a last resort.
|
||||
authed, err := oauth.Authed(c, true, true, true, true)
|
||||
authed, err := apiutil.TokenAuth(c, true, true, true, true)
|
||||
if err != nil {
|
||||
errWithCode := gtserror.NewErrorUnauthorized(err, err.Error())
|
||||
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue