From 9d9980df94d64839dd600d129ac3c73d9eb84823 Mon Sep 17 00:00:00 2001 From: nicolas-arnaud Date: Sun, 6 Nov 2022 20:54:34 +0100 Subject: [PATCH] added getters + github account fix --- default.json | 2 +- includes/Route.hpp | 4 ++++ srcs/load/Route.cpp | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/default.json b/default.json index 05d1d2c..a0d802c 100644 --- a/default.json +++ b/default.json @@ -11,7 +11,7 @@ "server_name": "localhost", "listens": ["8080"], "root": "./public", - "index": ["index.html"], + "indexs": ["index.html"], "locations": { "/docs": diff --git a/includes/Route.hpp b/includes/Route.hpp index 4ea478d..ae776d3 100644 --- a/includes/Route.hpp +++ b/includes/Route.hpp @@ -9,4 +9,8 @@ class Route { public: Route(JSONNode *datas); ~Route(void); + string getRoot(void); + string getReturn(void); + std::vector getIndexs(void); + bool getAutoindex(void); }; diff --git a/srcs/load/Route.cpp b/srcs/load/Route.cpp index 46af13b..4c022da 100644 --- a/srcs/load/Route.cpp +++ b/srcs/load/Route.cpp @@ -17,3 +17,10 @@ Route::Route(JSONNode *datas) { } Route::~Route(void) {} + +string getRoot(void); +string getReturn(void); +std::vector Route::getIndexs(void) { + return _indexs; +} +bool getAutoindex(void);