fixes recent pastes default bug (#22)

Co-authored-by: root <root@st5ve.com>
pull/26/head
Steve Hay 2 years ago committed by GitHub
parent c20830e502
commit 23b5eecba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,9 +8,12 @@ from cryptography.fernet import Fernet
import time
import uuid
import json
from os import environ
########## Paste functions ##########
config.recent_pastes = int(environ["PASTEY_RECENT_PASTES"]) if "PASTEY_RECENT_PASTES" in environ else config.recent_pastes
# Get recent n pastes, defined in config by recent_pastes
def get_recent(limit=config.recent_pastes):
paths = sorted(Path(config.data_directory).iterdir(), key=path.getmtime, reverse=True)

Loading…
Cancel
Save