Skip to content

Commit

Permalink
Extra check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjmarf committed Sep 25, 2023
1 parent 0802b31 commit a08583f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Mlem/API/APIClient/APIClient+Pictrs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ extension APIClient {
components.host = try self.session.instanceUrl.host
components.path = "/pictrs/image"

var request = URLRequest(url: components.url!)
guard let url = components.url else {
throw APIClientError.response(.init(error: "Failed to modify instance URL to add pictrs."), nil)
}
var request = URLRequest(url: url)
request.httpMethod = "POST"

let boundary = UUID().uuidString
Expand Down

0 comments on commit a08583f

Please sign in to comment.