added call to GET version (commit hash)
This commit is contained in:
parent
a529f4eb23
commit
12a0b1efe5
|
@ -108,7 +108,7 @@ virtualenv -p python3 .
|
||||||
Install the dependencies:
|
Install the dependencies:
|
||||||
|
|
||||||
```shell
|
```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:
|
Configure the bot:
|
||||||
|
|
|
@ -63,6 +63,13 @@ def confirm(city, token):
|
||||||
return dict(error='Email confirmation failed.')
|
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')
|
@post('/login')
|
||||||
@view('template/login.tpl')
|
@view('template/login.tpl')
|
||||||
def login_post():
|
def login_post():
|
||||||
|
|
Loading…
Reference in a new issue