diff --git a/src/main.cpp b/src/main.cpp index 812a643..6329cc3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -95,7 +95,7 @@ int main(int /*argc*/, char * /*argv*/[]) { } } - image::write(img); + image::write(img, req.magick); } catch (const std::runtime_error &e) { if (std::strlen(e.what()) != 0) { diff --git a/src/types.hpp b/src/types.hpp index a121343..1021de9 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -18,6 +18,7 @@ #define LIBRAVATARSERV_TYPES_HPP #include +#include #include namespace libravatarserv { @@ -31,7 +32,7 @@ struct request_t { algorithm_t algo; std::int16_t size; std::string fallback; - std::string magick; + std::optional magick; }; } // namespace libravatarserv