mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
Use semantic version for package
This commit is contained in:
@@ -20,11 +20,14 @@ LOGS_BASE_PATH: Final = f"{ROMM_BASE_PATH}/logs"
|
||||
HIGH_PRIO_STRUCTURE_PATH: Final = f"{LIBRARY_BASE_PATH}/roms"
|
||||
|
||||
# DEFAULT RESOURCES
|
||||
DEFAULT_URL_COVER_L: Final = "https://images.igdb.com/igdb/image/upload/t_cover_big/nocover.png"
|
||||
DEFAULT_URL_COVER_L: Final = (
|
||||
"https://images.igdb.com/igdb/image/upload/t_cover_big/nocover.png"
|
||||
)
|
||||
DEFAULT_PATH_COVER_L: Final = "default/default/cover/big.png"
|
||||
DEFAULT_URL_COVER_S: Final = "https://images.igdb.com/igdb/image/upload/t_cover_small/nocover.png"
|
||||
DEFAULT_URL_COVER_S: Final = (
|
||||
"https://images.igdb.com/igdb/image/upload/t_cover_small/nocover.png"
|
||||
)
|
||||
DEFAULT_PATH_COVER_S: Final = "default/default/cover/small.png"
|
||||
DEFAULT_PATH_USER_AVATAR: Final = f"users"
|
||||
|
||||
# MARIADB
|
||||
DB_HOST: Final = os.environ.get("DB_HOST", "127.0.0.1")
|
||||
|
||||
@@ -12,8 +12,6 @@ from config import (
|
||||
DEFAULT_PATH_COVER_L,
|
||||
DEFAULT_URL_COVER_S,
|
||||
DEFAULT_PATH_COVER_S,
|
||||
RESOURCES_BASE_PATH,
|
||||
DEFAULT_PATH_USER_AVATAR
|
||||
)
|
||||
from config.config_loader import config
|
||||
from exceptions.fs_exceptions import (
|
||||
@@ -306,6 +304,6 @@ def remove_rom(p_slug: str, file_name: str):
|
||||
|
||||
# ========= Users utils =========
|
||||
def build_avatar_path(avatar_path, username):
|
||||
avatar_user_path = f"{RESOURCES_BASE_PATH}/{DEFAULT_PATH_USER_AVATAR}/{username}"
|
||||
avatar_user_path = f"{RESOURCES_BASE_PATH}/users/{username}"
|
||||
Path(avatar_user_path).mkdir(parents=True, exist_ok=True)
|
||||
return f"{DEFAULT_PATH_USER_AVATAR}/{username}/{avatar_path}", avatar_user_path
|
||||
return f"users/{username}/{avatar_path}", avatar_user_path
|
||||
|
||||
@@ -11,6 +11,7 @@ from starlette.authentication import requires
|
||||
from config import ROMM_AUTH_SECRET_KEY
|
||||
|
||||
ALGORITHM: Final = "HS256"
|
||||
DEFAULT_OAUTH_TOKEN_EXPIRY: Final = 15
|
||||
|
||||
DEFAULT_SCOPES_MAP: Final = {
|
||||
"me.read": "View your profile",
|
||||
@@ -46,7 +47,7 @@ def create_oauth_token(data: dict, expires_delta: timedelta | None = None):
|
||||
if expires_delta:
|
||||
expire = datetime.utcnow() + expires_delta
|
||||
else:
|
||||
expire = datetime.utcnow() + timedelta(minutes=15)
|
||||
expire = datetime.utcnow() + timedelta(minutes=DEFAULT_OAUTH_TOKEN_EXPIRY)
|
||||
|
||||
to_encode.update({"exp": expire})
|
||||
|
||||
|
||||
4
frontend/package-lock.json
generated
4
frontend/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "romm",
|
||||
"version": "2.0",
|
||||
"version": "2.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "romm",
|
||||
"version": "1.10",
|
||||
"version": "2.0.0",
|
||||
"dependencies": {
|
||||
"@mdi/font": "7.0.96",
|
||||
"axios": "^1.3.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "romm",
|
||||
"version": "2.0",
|
||||
"version": "2.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "RomM"
|
||||
version = "2.0"
|
||||
version = "2.0.0"
|
||||
description = "RomM (Rom Manager) is a web based retro roms manager integrated with IGDB."
|
||||
authors = ["zurdi <zurdizurdo25@gmail.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
Reference in New Issue
Block a user