added call to GET version (commit hash)

stable2
b3yond 2019-01-11 13:38:47 +01:00
parent a529f4eb23
commit 12a0b1efe5
2 changed files with 8 additions and 1 deletions

View File

@ -108,7 +108,7 @@ virtualenv -p python3 .
Install the dependencies:
```shell
pip install tweepy pytoml Mastodon.py bottle pyjwt pylibscrypt Markdown twx
pip install tweepy pytoml Mastodon.py bottle pyjwt pylibscrypt Markdown twx gitpython
```
Configure the bot:

View File

@ -63,6 +63,13 @@ def confirm(city, token):
return dict(error='Email confirmation failed.')
@get('/version')
def version():
import git
repo = git.Repo(search_parent_directories=True)
return repo.head.object.hexsha
@post('/login')
@view('template/login.tpl')
def login_post():