Model::TweetからHttpPostにエラーハンドリングを移動した(#67)

This commit is contained in:
keita
2021-03-19 22:55:34 +09:00
parent 73e0b9f902
commit 9413cd8ce2
20 changed files with 107 additions and 122 deletions
+3 -4
View File
@@ -13,10 +13,9 @@ void Create::id(const std::string& _id) {
CocoaTweet::API::Model::Tweet Create::process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth) {
CocoaTweet::API::Model::Tweet tweet;
HttpPost::process(_oauth,
[&tweet](const unsigned int _responseCode, const std::string& _rcv) {
tweet = CocoaTweet::API::Model::Tweet(_responseCode, _rcv);
});
HttpPost::process(_oauth, [&tweet](const std::string& _rcv) {
tweet = CocoaTweet::API::Model::Tweet(_rcv);
});
return tweet;
}