Collections: allow to drag and drop to change book position

This commit is contained in:
2026-04-12 01:44:25 +02:00
parent d2fe3bf34f
commit 178c688203
15 changed files with 328 additions and 12 deletions

View File

@@ -51,6 +51,11 @@ type CollectionBook struct {
BookID uint `json:"bookId" binding:"required"`
}
type CollectionItemPosition struct {
Position uint `json:"position" binding:"required,gte=1"`
ItemID uint `json:"itemId" binding:"required"`
}
type FileInfoPost struct {
FileID uint `json:"fileId"`
FilePath string `json:"filepath"`

View File

@@ -51,6 +51,7 @@ type CollectionGet struct {
}
type CollectionItemGet struct {
ID uint `json:"id"`
Position uint `json:"position"`
Book BookItemGet `json:"book"`
}