LNHttpManager+Report.swift 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // LNHttpManager+Report.swift
  3. // Lanu
  4. //
  5. // Created by OneeChan on 2025/12/31.
  6. //
  7. import Foundation
  8. private let kNetPath_Report_Report = "/report/user"
  9. private let kNetPath_Report_Feedback = "/feedback/submit"
  10. private let kNetPath_Report_Event = "/event/report"
  11. extension LNHttpManager {
  12. func reportUser(uid: String, content: String, photos: [String], completion: @escaping (LNHttpError?) -> Void) {
  13. post(path: kNetPath_Report_Report, params: [
  14. "userNo": uid,
  15. "content": content,
  16. "images": photos
  17. ], completion: completion)
  18. }
  19. func feedback(content: String, photos: [String], completion: @escaping (LNHttpError?) -> Void) {
  20. post(path: kNetPath_Report_Feedback, params: [
  21. "content": content,
  22. "images": photos
  23. ], completion: completion)
  24. }
  25. func reportEvent(event: LNReportEvent, completion: @escaping (LNHttpError?) -> Void) {
  26. post(path: kNetPath_Report_Event, params: event.toParam, completion: completion)
  27. }
  28. }