fix target 2

This commit is contained in:
altalk23 2023-09-08 18:07:21 +03:00
parent 92ca99b82c
commit cbd1d04cab

View file

@ -546,14 +546,14 @@ AsyncWebRequest::~AsyncWebRequest() {
} }
AsyncWebResult<std::monostate> AsyncWebResponse::into(std::ostream& stream) { AsyncWebResult<std::monostate> AsyncWebResponse::into(std::ostream& stream) {
m_request.extra().m_target = &stream; m_request.m_target = &stream;
return this->as(+[](ByteVector const&) -> Result<std::monostate> { return this->as(+[](ByteVector const&) -> Result<std::monostate> {
return Ok(std::monostate()); return Ok(std::monostate());
}); });
} }
AsyncWebResult<std::monostate> AsyncWebResponse::into(ghc::filesystem::path const& path) { AsyncWebResult<std::monostate> AsyncWebResponse::into(ghc::filesystem::path const& path) {
m_request.extra().m_target = path; m_request.m_target = path;
return this->as(+[](ByteVector const&) -> Result<std::monostate> { return this->as(+[](ByteVector const&) -> Result<std::monostate> {
return Ok(std::monostate()); return Ok(std::monostate());
}); });