Compare commits

..

No commits in common. "9dc27157fff3ef7e97c0991950c78f631404afed" and "236082ba80d89c614f2c37e7d3187b0c7dac9190" have entirely different histories.

5 changed files with 0 additions and 37 deletions

View File

@ -99,7 +99,3 @@ class SqliteModel:
squad[pretty_key] = squad.pop(key)
return squads
def name2tags(self, name: str) -> list[dict]:
v = self.get_db().execute(sqlite_sql_requests.name2tags, {'name': name}).fetchall()
return v

View File

@ -43,12 +43,3 @@ from squadrons_current_data
where tag like :tag
order by platform;
"""
name2tags = """select
platform,
squad_id,
updated as updated_at,
name,
tag
from squadrons_current_data
where lower(name) = lower(:name);"""

View File

@ -1,2 +0,0 @@
falcon
loguru

View File

@ -1,16 +0,0 @@
[uwsgi]
master = 1
vacuum = true
socket = 127.0.0.1:8084
enable-threads = true
die-on-term = true
thunder-lock = false
threads = 1
processes = 4
wsgi-file = /home/user2/projects_production/jubilant-system-web/web/__init__.py
chdir = /home/user2/projects_production/jubilant-system-web
virtualenv = /home/user2/projects_production/jubilant-system-web/venv
uid = user2
gid = user2
need-app = true
plugin = python3

View File

@ -67,11 +67,6 @@ class SquadsInfoByTag:
resp.text = json.dumps(model_answer)
class SquadsName2Tags:
def on_get(self, req: falcon.request.Request, resp: falcon.response.Response, name: str):
resp.content_type = falcon.MEDIA_JSON
resp.text = json.dumps(model.name2tags(name))
class AppFixedLogging(falcon.App):
def _python_error_handler(self, req: falcon.request.Request, resp: falcon.response.Response, error, params):
__exception__ = error
@ -84,7 +79,6 @@ application.add_route('/squads/now/by-tag/{details_type}/{tag}', SquadsInfoByTag
application.add_route('/api/squads/now/by-tag/{details_type}/{tag}', SquadsInfoByTag(is_pattern=False))
application.add_route('/api/squads/now/search/by-tag/{details_type}/{tag}', SquadsInfoByTag(is_pattern=True))
application.add_route('/api/squads/now/by-name/{name}', SquadsName2Tags())
if __name__ == '__main__':
import waitress