restructure a bunch, get unfaves working

This commit is contained in:
tsmethurst
2021-06-04 14:16:29 +02:00
parent de3b6bc6d9
commit 1f44b06c06
25 changed files with 1190 additions and 681 deletions

View File

@ -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