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.

25 lines
619 B

#include "webserv.hpp"
Route::Route(JSONNode *datas) {
2 years ago
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) {}
string getRoot(void);
string getReturn(void);
2 years ago
std::vector<string> Route::getIndexs(void) { return _indexs; }
bool getAutoindex(void);