Browse Source

Remove github_webhook

JoostSijm 6 years ago
parent
commit
c922ad8fd0
4 changed files with 20 additions and 22 deletions
  1. 0 1
      Pipfile
  2. 1 16
      Pipfile.lock
  3. 16 0
      __init__.py
  4. 3 5
      app/flaskr.py

+ 0 - 1
Pipfile

@@ -7,7 +7,6 @@ verify_ssl = true
 
 [packages]
 flask = "*"
-github-webhook = "*"
 
 [requires]
 python_version = "3.7"

+ 1 - 16
Pipfile.lock

@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "06739af40b761a269a8947bb03b553cedcaad42933c070819700bb6e6e066531"
+            "sha256": "a82b674d67d29678775ff6b773de1686a9593749ec14483b0d8e05131b662286"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -31,14 +31,6 @@
             "index": "pypi",
             "version": "==1.0.2"
         },
-        "github-webhook": {
-            "hashes": [
-                "sha256:089c7b00c3711565dc14a9b741ef64383d2934a64961676d586b6ab558101030",
-                "sha256:5b13f43f1b764f688426f166c69d0dcdc4a1d88fa87a9017d127ed5752714d12"
-            ],
-            "index": "pypi",
-            "version": "==1.0.2"
-        },
         "itsdangerous": {
             "hashes": [
                 "sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19",
@@ -86,13 +78,6 @@
             ],
             "version": "==1.1.0"
         },
-        "six": {
-            "hashes": [
-                "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c",
-                "sha256:d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73"
-            ],
-            "version": "==1.12.0"
-        },
         "werkzeug": {
             "hashes": [
                 "sha256:c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c",

+ 16 - 0
__init__.py

@@ -0,0 +1,16 @@
+
+"""
+Initialize the modules needed for the website
+"""
+
+from flask import Flask
+
+class Config(object):
+    SECRET_KEY = 'vteUjB3NkP0sN6KwmFNHyW8JWkmeYRKN'
+    SEND_FILE_MAX_AGE_DEFAULT = 1296000
+
+
+app = Flask(__name__)
+app.config.from_object(Config())
+app.jinja_env.lstrip_blocks = True
+app.jinja_env.trim_blocks = True

+ 3 - 5
app/flaskr.py

@@ -5,18 +5,16 @@ Website for Craftbroec RR stuff
 
 from subprocess import call
 from flask import jsonify
-from app import app, webhook
+from app import app
 
 @app.route('/')
 def index():
     """Show index page"""
     return jsonify(True)
 
-@webhook.hook()
-@app.route('/deploy/<int:data>')
-def deploy(data):
+@app.route('/deploy')
+def deploy():
     """Run deploy script"""
-    return jsonify(True)
     call(["git", "pull"])
     call(["touch", "flask.wsgi"])
     return jsonify(True)