diff --git a/README.md b/README.md index a68131a..52f6eab 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,7 @@ To run the flask app, activate the venv and run: ```bash gunicorn -w 1 app:app ``` + +# Credits +original application, code and ideation by gruetzig +currently hosted and made available by eip and nintendo homebrew \ No newline at end of file diff --git a/app.py b/app.py index c951210..70bff5d 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,4 @@ -from flask import Flask, request, make_response, render_template +from flask import Flask, request, make_response, render_template, send_from_directory, url_for from flask_httpauth import HTTPBasicAuth from configparser import ConfigParser import os @@ -8,6 +8,8 @@ class AdminEntry: def __init__(self, name, sdserial, nandserial, twlnserial, secinfoserial, date): self.name = name + self.retrieveurl = url_for('retrieve', username=name) + self.deleteurl = url_for('delete', username=name) self.sdserial = sdserial self.nandserial = nandserial self.twlnserial = twlnserial @@ -45,6 +47,11 @@ def get_essential_list(): app = Flask(__name__) auth = HTTPBasicAuth() +@app.route('/favicon.ico') +def favicon(): + return send_from_directory(os.path.join(app.root_path, 'static'), + 'favicon.ico', mimetype='image/vnd.microsoft.icon') + @auth.verify_password def verify_password(username, password): if config_password == password and config_username == username: @@ -62,6 +69,10 @@ def get_submission(): return "

Hi

" +@app.route('/') +def index(): + return render_template('index.html') + @app.route('/admin') @auth.login_required def admin(): diff --git a/source/main.c b/source/main.c index a48021c..c62c20e 100644 --- a/source/main.c +++ b/source/main.c @@ -9,7 +9,7 @@ DrawContext ctx; #ifndef SERVER_ADDRESS -#define SERVER_ADDRESS "0.0.0.0" +#define SERVER_ADDRESS "https://soap.nintendohomebrew.com/submit" #endif void enter(char* inout, size_t len) { @@ -35,7 +35,7 @@ int main() { goto fail; } char discordtag[33] = ""; - char address[52] = SERVER_ADDRESS; + char address[52] = "https://soap.nintendohomebrew.com/submit"; initContext(&ctx); initColors(&ctx); int menustate = 0; diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..1d411c1 Binary files /dev/null and b/static/favicon.ico differ diff --git a/templates/admin.html b/templates/admin.html index 7faf05a..33cde2d 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -3,6 +3,7 @@ Admin Panel + + + +




i fucking love personal hygiene +

if you don't know what this service is for, you do not need to use it +
if you have been directed to use this service by someone and you are seeing this page, you are not following the instructions properly +
essential submitter application and backend both by gruetzig, hosted by eip/nh +
have a nice day
+ +