Skip to content

Commit

Permalink
remove slugify import
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmohsin7 committed Nov 28, 2024
1 parent b305035 commit e19670e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion backend/routers/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import requests
from ulid import ULID
from fastapi import APIRouter, Depends, Form, UploadFile, File, HTTPException, Header
from slugify import slugify

from database.apps import change_app_approval_status, get_unapproved_public_apps_db, \
add_app_to_db, update_app_in_db, delete_app_from_db, update_app_visibility_in_db
Expand Down
4 changes: 1 addition & 3 deletions backend/routers/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import requests
from fastapi import APIRouter, HTTPException, Depends, UploadFile
from fastapi.params import File, Form
from slugify import slugify
from ulid import ULID

from database.apps import add_app_to_db
Expand Down Expand Up @@ -116,8 +115,7 @@ def add_plugin(plugin_data: str = Form(...), file: UploadFile = File(...), uid=D
data = json.loads(plugin_data)
data['approved'] = False
data['name'] = data['name'].strip()
new_app_id = slugify(data['name']) + '-' + str(ULID())
data['id'] = new_app_id
data['id'] = str(ULID())
os.makedirs(f'_temp/plugins', exist_ok=True)
file_path = f"_temp/plugins/{file.filename}"
with open(file_path, 'wb') as f:
Expand Down

0 comments on commit e19670e

Please sign in to comment.