🐛 Bug fixes in check attachment
This commit is contained in:
parent
7d36755a72
commit
4b8bc3e09b
@ -94,7 +94,7 @@ func createPost(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
for _, attachment := range data.Attachments {
|
||||
if services.CheckAttachmentByUUIDExists(attachment, "i.attachment") {
|
||||
if !services.CheckAttachmentByUUIDExists(attachment, "i.attachment") {
|
||||
return fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("attachment %s not found", attachment))
|
||||
}
|
||||
}
|
||||
@ -170,7 +170,7 @@ func editPost(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
for _, attachment := range data.Attachments {
|
||||
if services.CheckAttachmentByUUIDExists(attachment, "i.attachment") {
|
||||
if !services.CheckAttachmentByUUIDExists(attachment, "i.attachment") {
|
||||
return fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("attachment %s not found", attachment))
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ bind = "0.0.0.0:8445"
|
||||
domain = "im.solsynth.dev"
|
||||
secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi"
|
||||
|
||||
content = "uploads"
|
||||
|
||||
[debug]
|
||||
database = false
|
||||
print_routes = false
|
||||
|
Loading…
Reference in New Issue
Block a user