diff --git a/Sources/SwiftDevRant/DevRantRequest.swift b/Sources/SwiftDevRant/DevRantRequest.swift index 9946803..04e4334 100644 --- a/Sources/SwiftDevRant/DevRantRequest.swift +++ b/Sources/SwiftDevRant/DevRantRequest.swift @@ -360,7 +360,7 @@ public extension DevRantRequest { var parameters = config.urlParameters - parameters["content"] = text + parameters["rant"] = text parameters["tags"] = tags parameters["type"] = String(kind.rawValue) @@ -411,11 +411,10 @@ public extension DevRantRequest { /// - Parameters: /// - token: The token from the `logIn` call response. /// - rantId: The id of the rant. - /// - kind: The type of the rant. /// - text: The text content of the rant. /// - tags: The rants's associated tags. /// - image: An image to attach to the rant. - func editRant(token: AuthToken, rantId: Int, kind: Rant.Kind, text: String, tags: String, image: Data?, imageConversion: [ImageDataConverter] = [.unsupportedToJpeg]) async throws { + func editRant(token: AuthToken, rantId: Int, text: String, tags: String, image: Data?, imageConversion: [ImageDataConverter] = [.unsupportedToJpeg]) async throws { let boundary = UUID().uuidString let config = makeMultipartConfig(.post, path: "devrant/rants/\(rantId)", boundary: boundary, token: token) @@ -424,7 +423,6 @@ public extension DevRantRequest { parameters["rant"] = text parameters["tags"] = tags - parameters["type"] = String(kind.rawValue) let convertedImage = image.flatMap { imageConversion.convert($0) } diff --git a/Sources/SwiftDevRant/Models/Link.swift b/Sources/SwiftDevRant/Models/Link.swift index cd08271..67c564f 100644 --- a/Sources/SwiftDevRant/Models/Link.swift +++ b/Sources/SwiftDevRant/Models/Link.swift @@ -10,7 +10,8 @@ public struct Link: Hashable, Sendable { /// The full URL. public let url: String - public let shortURL: String? //TODO: what is this and what is it used for? + /// No idea what this is and what it is supposed to be used for. + public let shortURL: String? /// The url as it is visible in the text of the rant or comment. public let title: String