Skip to content

Commit

Permalink
chore: Merge dev to main
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX authored Oct 23, 2023
2 parents cc3c202 + 5aed3d6 commit 3404b53
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
12 changes: 11 additions & 1 deletion api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@
from api.donations import donations
from api.announcements import announcements
from api.login import login
from api.robots import robots

api = Blueprint.group(
login, ping, github, info, socials, donations, announcements, compat, url_prefix="/"
login,
ping,
github,
info,
socials,
donations,
announcements,
compat,
robots,
url_prefix="/",
)
10 changes: 10 additions & 0 deletions api/robots.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from sanic import Blueprint
from sanic.response import text


robots: Blueprint = Blueprint("robots")


@robots.get("/robots.txt")
async def robots_txt(request):
return text("User-agent: *\nDisallow: /", content_type="text/plain")
12 changes: 6 additions & 6 deletions data/database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

engine = create_engine("sqlite:///persistance/database.db")

Session = sessionmaker(bind=engine)
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

engine = create_engine("sqlite:///persistance/database.db", pool_size=20)

Session = sessionmaker(bind=engine)

0 comments on commit 3404b53

Please sign in to comment.