refactor: Remove Outcome from network requests (#4959)

This commit is contained in:
nerix
2023-11-12 14:51:51 +01:00
committed by GitHub
parent 95620e6e10
commit 6faf63c5c4
22 changed files with 122 additions and 228 deletions
+1 -3
View File
@@ -156,7 +156,7 @@ void uploadImageToNuuls(RawImageData imageData, ChannelPtr channel,
.headerList(extraHeaders)
.multiPart(payload)
.onSuccess([&textEdit, channel,
originalFilePath](NetworkResult result) -> Outcome {
originalFilePath](NetworkResult result) {
QString link = getSettings()->imageUploaderLink.getValue().isEmpty()
? result.getData()
: getLinkFromResponse(
@@ -202,8 +202,6 @@ void uploadImageToNuuls(RawImageData imageData, ChannelPtr channel,
}
logToFile(originalFilePath, link, deletionLink, channel);
return Success;
})
.onError([channel](NetworkResult result) -> bool {
auto errorMessage =