def create_general_meme(image: _fastapi.UploadFile = _fastapi.File(...)): file_path = _services.upload_image("memes", image) if file_path is None: return _fastapi.HTTPException(status_code=409, detail="incorrect file type") return _responses.FileResponse(file_path)
def privacy_policy(): return responses.FileResponse(os.path.join(DOCUMENTS_PATH, 'privacy_policy.pdf'), media_type='application/pdf')
def get_general_memes(): image_path = _services.select_random_image("memes") return _responses.FileResponse(image_path)
def terms_of_service(): return responses.FileResponse(os.path.join(DOCUMENTS_PATH, 'terms_of_service.pdf'), media_type='application/pdf')
def get_meme(): return _responses.FileResponse("ProgrammerHumor/tq00bck4mov61.gif")
def get_cat_memes(): image_path = _services.select_random_image("Catmemes") return _responses.FileResponse(image_path)
def post_programmer_meme(image: _fastapi.UploadFile = _fastapi.File(...)): file_name = _services.upload_image("ProgrammerHumor", image) if file_name is None: return _fastapi.HTTPException(status_code=409, detail="incorrect file type") return _responses.FileResponse(file_name)
def get_programmer_meme(): image_path = _services.select_random_image("ProgrammerHumor") return _responses.FileResponse(image_path)