mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 13:19:58 -05:00
Feature/raspberry pi archive (#72)
* Converting OTP PDF generation to Latex to avoid installing wkhtmltopdf. * Creating temporary_directory_path to simplify creating a TemporaryDirectory of type Path. * Removing author * Linting * Installing texlive-latex-extra for more readable font. * Raspberry pi has to archive locally. Signed-off-by: Roland <roland@learningselfreliance.com>
This commit is contained in:
parent
d8f4d356bb
commit
6e55e7360b
10 changed files with 158 additions and 49 deletions
|
|
@ -7,7 +7,7 @@ from sanic.request import Request
|
|||
|
||||
from wrolpi.root_api import get_blueprint
|
||||
from wrolpi.schema import validate_doc
|
||||
from .common import generate_html, generate_pdf, encrypt_otp, decrypt_otp
|
||||
from .common import generate_pdf, encrypt_otp, decrypt_otp
|
||||
from .schema import EncryptOTPRequest, DecryptOTPRequest
|
||||
|
||||
bp = get_blueprint('OTP', '/api/otp')
|
||||
|
|
@ -33,11 +33,6 @@ async def post_decrypt_otp(_: Request, data: dict):
|
|||
return response.json(data)
|
||||
|
||||
|
||||
@bp.get('/html')
|
||||
async def get_new_otp(_: Request):
|
||||
return response.html(generate_html())
|
||||
|
||||
|
||||
@bp.get('/pdf')
|
||||
async def get_new_otp_pdf(_: Request):
|
||||
random_name = ''.join(random.choice(ascii_letters) for _ in range(8))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue