mirror of
https://gitlab.com/niansa/discordlistforbots.git
synced 2025-03-06 20:49:22 +01:00
Added imprint
This commit is contained in:
parent
c018d190af
commit
4945cffee8
12 changed files with 41 additions and 16 deletions
|
@ -16,9 +16,9 @@ Create a file named `config.h` in the root then paste and edit the following:
|
|||
|
||||
#define OAUTH_URL "https://discord.com/api/oauth2/authorize?client_id=795612465130897420&redirect_uri=http%3A%2F%2Flocalhost:8082%2Fdiscordauth&response_type=code&scope=identify"
|
||||
#define CLIENT_ID "795612465130897420"
|
||||
#define CLIENT_SECRET "EfXdBUarb8ZSZyyYQggSAzXYwIdXa3-y"
|
||||
#define CLIENT_SECRET "<your secret here>"
|
||||
#define REDIRECT_URI "http://localhost:8082/discordauth"
|
||||
#define BOT_TOKEN "Nzk1NjEyNDY1MTMwODk3NDIw.X_L52Q.tr_WaAmgp-QvtS8EPSaJnZhG4Gk"
|
||||
#define BOT_TOKEN "<your bot token here>"
|
||||
#define LOG_WEBHOOK "824208240333291561/eI39bQGclrizr0OzRGrB_W7QI3gfY7tlYpWv8RkkDVzIOVFRDTjgkuavE7YfkIzDcGsy"
|
||||
|
||||
#define MODERATORS {609486822715818000, 703944517048598568, 705557092802625576, 664869643567235097, 775017772358434817}
|
||||
|
@ -28,6 +28,8 @@ Create a file named `config.h` in the root then paste and edit the following:
|
|||
#define SHORT_NAME "DFB"
|
||||
#define LONG_NAME "Discordlist for Bots"
|
||||
#define DESCRIPTION "Find a lot of bots that will be useful to your server"
|
||||
|
||||
#define IMPRINT "<your imprint here>"
|
||||
|
||||
(Original config.h, no longer in use)
|
||||
|
||||
|
|
|
@ -171,6 +171,13 @@ void views::start(
|
|||
callback(HttpResponse::newRedirectionResponse("/bots/@all", HttpStatusCode::k301MovedPermanently));
|
||||
}
|
||||
|
||||
void views::imprint(
|
||||
const HttpRequestPtr&, std::function<void (const HttpResponsePtr &)> &&callback
|
||||
)
|
||||
{
|
||||
callback(HttpResponse::newHttpViewResponse("imprint.csp", {}));
|
||||
}
|
||||
|
||||
void views::menu(
|
||||
const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback
|
||||
)
|
||||
|
|
|
@ -55,6 +55,7 @@ public:
|
|||
views();
|
||||
static std::string htmlBr(const std::string&);
|
||||
void start(const HttpRequestPtr&, std::function<void (const HttpResponsePtr &)> &&);
|
||||
void imprint(const HttpRequestPtr&, std::function<void (const HttpResponsePtr &)> &&);
|
||||
void menu(const HttpRequestPtr&, std::function<void (const HttpResponsePtr &)> &&);
|
||||
void botlist(const HttpRequestPtr&, std::function<void (const HttpResponsePtr &)> &&);
|
||||
void botdetail(const HttpRequestPtr&, std::function<void (const HttpResponsePtr &)> &&, uint64_t);
|
||||
|
@ -67,6 +68,7 @@ public:
|
|||
|
||||
METHOD_LIST_BEGIN
|
||||
ADD_METHOD_TO(views::start, "/", Get);
|
||||
ADD_METHOD_TO(views::imprint, "/imprint", Get);
|
||||
ADD_METHOD_TO(views::botlist, "/bots/@all", Get);
|
||||
ADD_METHOD_TO(views::botlist, "/bots/@me", Get, "LoginFilter");
|
||||
ADD_METHOD_TO(views::botlist, "/bots/@unapproved", Get, "LoginFilter");
|
||||
|
|
|
@ -126,3 +126,7 @@ body {
|
|||
display:block;
|
||||
}
|
||||
}
|
||||
|
||||
.imprint_link {
|
||||
color: white;
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
%>
|
||||
|
||||
<%inc#include "controllers/views.h"
|
||||
|
||||
#include "controllers/views.h"
|
||||
#include "config.h" %>
|
||||
<%c++ auto sessionData = @@.get<SessionDataPtr>("sessionData");%>
|
||||
<%layout global_layout%>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
%>
|
||||
|
||||
<%inc#include "controllers/views.h"
|
||||
|
||||
#include "controllers/views.h"
|
||||
#include "config.h" %>
|
||||
<%c++ auto bot = @@.get<Bot>("bot");%>
|
||||
<%c++ auto canVote = @@.get<bool>("canVote");%>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
%>
|
||||
|
||||
<%inc#include "controllers/views.h"
|
||||
|
||||
#include "controllers/views.h"
|
||||
#include "config.h" %>
|
||||
<%c++ auto bot = @@.get<Bot>("bot");%>
|
||||
<%layout global_layout%>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
%>
|
||||
|
||||
<%inc#include "controllers/views.h"
|
||||
|
||||
#include "controllers/views.h"
|
||||
#include "config.h" %>
|
||||
<%c++ auto modView = @@.get<bool>("modView");%>
|
||||
<%c++ auto justMine = @@.get<bool>("justMine");%>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
%>
|
||||
|
||||
<%inc#include "controllers/views.h"
|
||||
|
||||
#include "controllers/views.h"
|
||||
#include "config.h" %>
|
||||
<%c++ auto sessionData = @@.get<SessionDataPtr>("sessionData");%>
|
||||
<%c++ auto error = @@.get<std::string>("error");%>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
%>
|
||||
|
||||
<%inc#include "controllers/views.h"
|
||||
|
||||
#include "controllers/views.h"
|
||||
#include "config.h" %>
|
||||
<%c++ auto sessionData = @@.get<SessionDataPtr>("sessionData");%>
|
||||
|
||||
|
@ -67,6 +67,10 @@
|
|||
|
||||
[[]]
|
||||
|
||||
<div style="position:fixed;bottom:0;">
|
||||
<a class="imprint_link" href="/imprint">Imprint</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
6
views/imprint.csp
Normal file
6
views/imprint.csp
Normal file
|
@ -0,0 +1,6 @@
|
|||
<%inc#include "config.h" %>
|
||||
<%layout global_layout%>
|
||||
|
||||
<p>
|
||||
{%IMPRINT%}
|
||||
</p>
|
|
@ -16,9 +16,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
%>
|
||||
|
||||
<%inc#include "controllers/views.h"
|
||||
|
||||
#include "controllers/views.h"
|
||||
#include "config.h" %>
|
||||
<%c++ auto ref = @@.get<std::string>("ref");%>
|
||||
<%c++ auto sessionData = @@.get<SessionDataPtr>("sessionData");%>
|
||||
|
|
Loading…
Add table
Reference in a new issue