You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
485 B
19 lines
485 B
#include "webserv.hpp"
|
|
|
|
Route::Route(JSONNode *datas) {
|
|
JSONObject object = datas->obj();
|
|
if (object["root"])
|
|
_root = object["root"]->str();
|
|
if (object["return"])
|
|
_ret = object["return"]->str();
|
|
if (object["autoindex"])
|
|
_autoindex = object["autoindex"]->boo();
|
|
if (object["indexs"]) {
|
|
JSONList indexs = object["indexs"]->lst();
|
|
for (JSONList::iterator it = indexs.begin(); it < indexs.end(); it++) {
|
|
_indexs.push_back((*it)->str());
|
|
}
|
|
}
|
|
}
|
|
|
|
Route::~Route(void) {}
|
|
|