[feat] team view & [fix] cors

This commit is contained in:
Data-Name-ID
2024-03-31 22:07:33 +03:00
parent c3d39ba55b
commit c0f48eae12
6 changed files with 79 additions and 11 deletions
+2 -4
View File
@@ -54,6 +54,7 @@ INSTALLED_APPS = [
# project apps
"users.apps.UsersConfig",
"notifications.apps.NotificationsConfig",
"teams.apps.TeamsConfig",
]
MIDDLEWARE = [
@@ -155,7 +156,4 @@ REST_FRAMEWORK = {
if DEBUG and not (TESTING or MIGRATING):
register_debug_toolbar()
CORS_ALLOWED_ORIGINS = [
"http://158.160.56.239:8080",
"http://158.160.56.239:3000",
]
CORS_ORIGIN_ALLOW_ALL = True
+2
View File
@@ -8,9 +8,11 @@ from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions, routers
from users.views import UserViewSet
from teams.views import TeamsViewSet
router = routers.DefaultRouter()
router.register("users", UserViewSet)
router.register("teams", TeamsViewSet)
schema_view = get_schema_view(
openapi.Info(title="SkillHub API", default_version="v1"),