mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 12:32:25 -05:00
restructure a bunch, get unfaves working
This commit is contained in:
parent
de3b6bc6d9
commit
1f44b06c06
25 changed files with 1190 additions and 681 deletions
|
|
@ -23,7 +23,7 @@ import (
|
|||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/processing"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
|
||||
)
|
||||
|
||||
// InboxPOSTHandler deals with incoming POST requests to an actor's inbox.
|
||||
|
|
@ -42,7 +42,7 @@ func (m *Module) InboxPOSTHandler(c *gin.Context) {
|
|||
|
||||
posted, err := m.processor.InboxPost(c.Request.Context(), c.Writer, c.Request)
|
||||
if err != nil {
|
||||
if withCode, ok := err.(processing.ErrorWithCode); ok {
|
||||
if withCode, ok := err.(gtserror.WithCode); ok {
|
||||
l.Debug(withCode.Error())
|
||||
c.JSON(withCode.Code(), withCode.Safe())
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue