fix: Go compiler error with MoveRequest inline struct and remove refactor.js
All checks were successful
Automated Container Build / build-and-push (push) Successful in 57s

This commit is contained in:
Elijah 2026-05-23 13:57:43 -07:00
parent 10bab4ea5b
commit 45989ef97d
2 changed files with 7 additions and 306 deletions

View file

@ -403,13 +403,16 @@ func (h *FSHandler) Rename(c *fiber.Ctx) error {
return c.JSON(fiber.Map{"message": "renamed successfully", "new_path": filepath.ToSlash(newPath)})
}
type MoveRequest struct {
SourcePath string `json:"source_path"`
DestPath string `json:"dest_path"`
Resolution string `json:"resolution"` // "overwrite", "rename", "skip"
}
// Move moves a file or folder to a new location.
// POST /api/files/move
func (h *FSHandler) Move(c *fiber.Ctx) error {
var body struct {
SourcePath string `json:"source_path"`
DestPath string `json:"dest_path"`
}
var body MoveRequest
if err := c.BodyParser(&body); err != nil {
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": "invalid request body"})
}