remove the logic for fixing old mentions

pull/78/head
Aevann1 2022-12-16 19:50:34 +02:00
parent 8660fcaa2e
commit 90f6f0b96e
1 changed files with 0 additions and 17 deletions

View File

@ -20,23 +20,6 @@ from files.routes.wrappers import *
from .front import frontlist
my = re.compile('.*?(src="/uid/([a-zA-Z]+)/pic/profile").*?', flags=re.I)
@app.get('/admin/fix')
@admin_level_required(3)
def fix_36(v):
comments = g.db.query(Comment).filter(Comment.body_html.op("SIMILAR TO")('%src="/uid/[a-zA-Z]+/pic/profile"%')).all()
for c in comments:
print(c.id, flush=True)
for i in my.finditer(c.body_html):
b36 = i.group(2)
print(f"b36: {b36}")
b10 = int(b36, 36)
print(f"b10: {b10}")
new = f'src="/uid/{b10}/pic"'
c.body_html = c.body_html.replace(i.group(1), new)
return 'nig'
@app.post('/kippy')
@admin_level_required(PERMS['PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES'])
def kippy(v):