Compare commits
15 commits
71cbd351d1
...
090905826c
Author | SHA1 | Date | |
---|---|---|---|
090905826c | |||
9b344c1138 | |||
504e43258b | |||
649c80b5fc | |||
123ece89be | |||
6d044c3271 | |||
c9a01ac68e | |||
8c91f0baaf | |||
8fec13cad4 | |||
e81e079727 | |||
5ab66c1e67 | |||
ce74bdeb39 | |||
638a924f96 | |||
5bb2aa73e1 | |||
aa26855b43 |
2 changed files with 41 additions and 7 deletions
37
.drone.yml
Normal file
37
.drone.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
kind: pipeline
|
||||||
|
name: backend
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: backend
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: caminsha/behaviobio
|
||||||
|
dockerfile: backend/Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: DOCKER_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: DOCKER_SECRET
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: frontend
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: frontend
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: caminsha/behaviobio
|
||||||
|
dockerfile: frontend/Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: DOCKER_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: DOCKER_SECRET
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
|
@ -4,6 +4,7 @@ import flask
|
||||||
import flask_sqlalchemy
|
import flask_sqlalchemy
|
||||||
import flask_praetorian
|
import flask_praetorian
|
||||||
import flask_cors
|
import flask_cors
|
||||||
|
import sys
|
||||||
|
|
||||||
db = flask_sqlalchemy.SQLAlchemy()
|
db = flask_sqlalchemy.SQLAlchemy()
|
||||||
guard = flask_praetorian.Praetorian()
|
guard = flask_praetorian.Praetorian()
|
||||||
|
@ -223,16 +224,12 @@ def survey():
|
||||||
return ret, 400
|
return ret, 400
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/protected/behavior', methods=['GET'])
|
|
||||||
@flask_praetorian.auth_required
|
|
||||||
def get_randompassword():
|
|
||||||
print("Hallo")
|
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/protected/behavior', methods=['POST'])
|
@app.route('/api/protected/behavior', methods=['POST'])
|
||||||
@flask_praetorian.auth_required
|
@flask_praetorian.auth_required
|
||||||
def check_password_username():
|
def check_password_username():
|
||||||
print("hallooo POST")
|
print("hallooo POST", file=sys.stderr)
|
||||||
|
ret = {'message': 'Top'}
|
||||||
|
return ret, 200
|
||||||
|
|
||||||
|
|
||||||
# Run the example
|
# Run the example
|
||||||
|
|
Loading…
Reference in a new issue