pica/handler/env.cpp

18 lines
395 B
C++

// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "env.h"
Handler::Env::Env():
Handler("env", Request::Method::get)
{}
void Handler::Env::handle(Request& request) {
nlohmann::json body = nlohmann::json::object();
request.printEnvironment(body);
Response res(request);
res.setBody(body);
res.send();
}