|
@@ -8,13 +8,12 @@ import os
|
|
|
|
|
|
# Third party modules
|
|
|
from aiohttp import web
|
|
|
-# from davtelepot import Bot
|
|
|
|
|
|
# Project modules
|
|
|
from data.config import (
|
|
|
log_file_name, errors_file_name, app_host, app_port
|
|
|
)
|
|
|
-# from data.passwords import bot_token
|
|
|
+from data.passwords import pull_token
|
|
|
|
|
|
path = os.path.dirname(__file__)
|
|
|
log_file = "{}/data/{}".format(path, log_file_name)
|
|
@@ -82,12 +81,12 @@ async def test(request):
|
|
|
return str(datetime.datetime.now())
|
|
|
|
|
|
|
|
|
-@page('/pull/image-editor/nZ7Vgm9SSg4vNBy3ytG')
|
|
|
+@page('/pull/t/image-editor'.format(t=pull_token))
|
|
|
async def pull_image_editor_project(request):
|
|
|
"""Git pull at request."""
|
|
|
try:
|
|
|
_subprocess = await asyncio.create_subprocess_shell(
|
|
|
- 'bash {path}/pull_image_editor.sh'.format(
|
|
|
+ 'bash {path}/update_image_editor.sh'.format(
|
|
|
path=path
|
|
|
)
|
|
|
)
|
|
@@ -103,7 +102,7 @@ async def pull_image_editor_project(request):
|
|
|
return web.Response(
|
|
|
status=302,
|
|
|
headers={
|
|
|
- 'location': 'https://www.davte.it/michele/image-editor/src/',
|
|
|
+ 'location': 'https://michele.davte.it/image-editor/',
|
|
|
},
|
|
|
)
|
|
|
|