(c *fiber.Ctx)
| 372 | } |
| 373 | |
| 374 | func UnfollowUserForm(c *fiber.Ctx) error { |
| 375 | // lets get the user params |
| 376 | actor := c.FormValue("user_id") |
| 377 | if actor == "" { |
| 378 | actor = c.FormValue("screen_name") |
| 379 | if actor == "" { |
| 380 | return ReturnError(c, "No user was specified", 195, 403) |
| 381 | } |
| 382 | } else { |
| 383 | id, err := strconv.ParseInt(actor, 10, 64) |
| 384 | if err != nil { |
| 385 | return ReturnError(c, "Invalid ID format", 195, 403) |
| 386 | } |
| 387 | actorPtr, err := bridge.TwitterIDToBlueSky(&id) |
| 388 | if err != nil { |
| 389 | return ReturnError(c, "ID not found.", 144, fiber.StatusNotFound) |
| 390 | } |
| 391 | if actorPtr == nil { |
| 392 | return ReturnError(c, "ID not found.", 144, fiber.StatusNotFound) |
| 393 | } |
| 394 | actor = *actorPtr |
| 395 | } |
| 396 | return UnfollowUser(c, actor) |
| 397 | } |
| 398 | |
| 399 | func UnfollowUserParams(c *fiber.Ctx) error { |
| 400 | // This should allow lookup with a handle, but tbh, i'm too lazy to implement that right now as i do not see it being used. |
nothing calls this directly
no test coverage detected