18 lines
410 B
C++
18 lines
410 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.createResponse();
|
|
res.setBody(body);
|
|
res.send();
|
|
}
|