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