-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into api/post-patch-user
- Loading branch information
Showing
9 changed files
with
307 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
from django.urls import path | ||
from django.urls import include, path | ||
|
||
from . import views | ||
|
||
game_patterns = [ | ||
path("", views.GameListView.as_view(), name="api-game-list"), | ||
path("<int:pk>/", views.GameDetailView.as_view(), name="api-game-detail"), | ||
path("<int:pk>/categories/", views.GameCategoriesAPIView.as_view(), name="api-game-categories"), | ||
path("<int:pk>/mechanics/", views.GameMechanicsAPIView.as_view(), name="api-game-mechanics"), | ||
] | ||
|
||
lobby_patterns = [ | ||
path("", views.LobbyListView.as_view(), name="api-lobby-list"), | ||
path("<int:pk>/", views.LobbyDetailView.as_view(), name="api-lobby-detail"), | ||
] | ||
|
||
user_patterns = [ | ||
path("", views.UserListView.as_view(), name="api-user-list"), | ||
path("<slug:slug>/", views.UserDetailView.as_view(), name="api-user-detail"), | ||
path("<slug:slug>/groups/", views.UserGroupsView.as_view(), name="api-user-groups"), | ||
path("<int:pk>/friends/", views.UserFriendsAPIView.as_view(), name="api-user-friends"), | ||
] | ||
|
||
tournament_patterns = [ | ||
path("chat/", views.MessageView.as_view(), name="api-chat-list"), | ||
path("chat/feed/", views.MessageFeedView.as_view(), name="api-chat-detail"), | ||
] | ||
|
||
group_patterns = [ | ||
path("", views.GroupListView.as_view(), name="api-group-list"), | ||
path("<int:pk>/", views.GroupDetailView.as_view(), name="api-group-detail"), | ||
path("<int:pk>/members/", views.GroupMembersView.as_view(), name="api-group-members"), | ||
] | ||
|
||
urlpatterns = [ | ||
# GAME API URLS | ||
path("games/", views.GameListView.as_view(), name="api-game-list"), | ||
path("games/<int:pk>/", views.GameDetailView.as_view(), name="api-game-detail"), | ||
# LOBBY API URLS | ||
path("lobbies/", views.LobbyListView.as_view(), name="api-lobby-list"), | ||
path("lobbies/<int:pk>/", views.LobbyDetailView.as_view(), name="api-lobby-detail"), | ||
# USER API URLS | ||
path("users/", views.UserListView.as_view(), name="api-user-list"), | ||
path("users/<slug:slug>/", views.UserDetailView.as_view(), name="api-user-detail"), | ||
path("users/<int:pk>/friends/", views.UserFriendsAPIView.as_view(), name="api-user-friends"), | ||
path("users/<slug:slug>/groups/", views.UserGroupsView.as_view(), name="api-user-groups"), | ||
# CHAT API URLS | ||
path("tournaments/chat/", views.MessageView.as_view(), name="api-chat-list"), | ||
path("tournaments/chat/feed/", views.MessageFeedView.as_view(), name="api-chat-detail"), | ||
# GROUP API URLS | ||
path("groups/", views.GroupListView.as_view(), name="api-group-list"), | ||
path("groups/<int:pk>/", views.GroupDetailView.as_view(), name="api-group-detail"), | ||
path("groups/<int:pk>/members/", views.GroupMembersView.as_view(), name="api-group-members"), | ||
path("games/", include(game_patterns)), | ||
path("lobbies/", include(lobby_patterns)), | ||
path("users/", include(user_patterns)), | ||
path("tournaments/", include(tournament_patterns)), | ||
path("groups/", include(group_patterns)), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/chigame/games/migrations/0022_tournament_created_by.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 4.2.4 on 2023-12-06 01:16 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("games", "0021_alter_tournament_matches"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="tournament", | ||
name="created_by", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="created_tournaments", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.