actually pass file type to image::write()

This commit is contained in:
tastytea 2022-06-11 06:40:00 +02:00
parent e4b246bc75
commit 2b9575c51a
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -18,6 +18,7 @@
#define LIBRAVATARSERV_TYPES_HPP
#include <cstdint>
#include <optional>
#include <string>
namespace libravatarserv {
@ -31,7 +32,7 @@ struct request_t {
algorithm_t algo;
std::int16_t size;
std::string fallback;
std::string magick;
std::optional<std::string> magick;
};
} // namespace libravatarserv