mirror of
https://github.com/versia-pub/versia-go.git
synced 2026-03-13 04:29:15 +01:00
refactor!: add missing fields and docs
This commit is contained in:
parent
61891d891a
commit
6e59386f60
73 changed files with 726 additions and 580 deletions
|
|
@ -5,11 +5,11 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"github.com/lysand-org/versia-go/internal/validators/val_impls"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/pkg/lysand"
|
||||
)
|
||||
|
||||
func (i *Handler) LysandInbox(c *fiber.Ctx) error {
|
||||
|
|
@ -29,13 +29,13 @@ func (i *Handler) LysandInbox(c *fiber.Ctx) error {
|
|||
return api_schema.ErrBadRequest(nil)
|
||||
}
|
||||
|
||||
obj, err := lysand.ParseInboxObject(raw)
|
||||
obj, err := versia.ParseInboxObject(raw)
|
||||
if err != nil {
|
||||
i.log.Error(err, "Failed to parse inbox object")
|
||||
|
||||
if errors.Is(err, lysand.ErrUnknownType{}) {
|
||||
if errors.Is(err, versia.UnknownEntityTypeError{}) {
|
||||
return api_schema.ErrNotFound(map[string]any{
|
||||
"error": fmt.Sprintf("Unknown object type: %s", err.(lysand.ErrUnknownType).Type),
|
||||
"error": fmt.Sprintf("Unknown object type: %s", err.(versia.UnknownEntityTypeError).Type),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue