This commit is contained in:
Mm2PL 2022-09-17 00:07:16 +02:00
parent 5ea07c5d47
commit 54d5ce5568
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

View file

@ -27,7 +27,7 @@ public:
template <typename OkType, typename ErrorType> template <typename OkType, typename ErrorType>
class APIRequest class APIRequest
{ {
using APISuceessCallback = std::function<Outcome(NetworkResult, OkType)>; using APISuccessCallback = std::function<Outcome(NetworkResult, OkType)>;
using APIErrorCallback = std::function<void(NetworkResult, ErrorType)>; using APIErrorCallback = std::function<void(NetworkResult, ErrorType)>;
using APIFinallyCallback = std::function<void()>; using APIFinallyCallback = std::function<void()>;
@ -104,7 +104,7 @@ public:
return std::move(*this); return std::move(*this);
}; };
APIRequest<OkType, ErrorType> onSuccess(const APISuceessCallback &cb) && APIRequest<OkType, ErrorType> onSuccess(const APISuccessCallback &cb) &&
{ {
this->data_->onSuccess = cb; this->data_->onSuccess = cb;
return std::move(*this); return std::move(*this);