[feat] team view & [fix] cors
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user