Skip to content

Commit

Permalink
Adding last routes apiinterface and fixing mockoon
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo Auffeuvre committed Mar 23, 2024
1 parent d3e4790 commit b2e9d88
Show file tree
Hide file tree
Showing 11 changed files with 2,101 additions and 2,116 deletions.
Binary file not shown.
Binary file modified canopeum_backend/canopeum_backend/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file modified canopeum_backend/canopeum_backend/__pycache__/views.cpython-312.pyc
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions canopeum_backend/canopeum_backend/serializers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.contrib.auth.models import User
from rest_framework import serializers
from .models import BatchSeed, BatchSpecies, BatchSupportedSpecies, Batchfertilizer, Contact, Coordinate, Internationalization, Mulchlayertype, Site, Post, Batch, Announcement, Like, Comment, Sitetreespecies, Sitetype, SitetypeInternationalization, Treetype, Widget

class AuthUserSerializer(serializers.ModelSerializer):
Expand Down
10 changes: 5 additions & 5 deletions canopeum_backend/canopeum_backend/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
path('auth/login/', views.LoginAPIView.as_view(), name='login'),
path('auth/logout/', views.LogoutAPIView.as_view(), name='logout'),
path('auth/register/', views.RegisterAPIView.as_view(), name='register'),
path('auth/current_user/', views.CurrentUserAPIView.as_view(), name='current-user'),

### Social

Expand All @@ -26,7 +25,7 @@
path('social/posts/<int:postId>/likes/', views.LikeListAPIView.as_view(), name='like-list'),

# Site
path('social/sites/', views.SiteListAPIView.as_view(), name='site-list'),
path('social/sites/', views.SiteSocialDetailAPIView.as_view(), name='site-list'),
path('social/sites/<int:siteId>/', views.SiteSocialDetailAPIView.as_view(), name='site-detail'),

# Announcement
Expand All @@ -44,8 +43,8 @@
# Site
path('analytics/sites/', views.SiteListAPIView.as_view(), name='site-list'),
path('analytics/sites/<int:siteId>/', views.SiteDetailAPIView.as_view(), name='site-detail'),
path('analytics/sites/summary', views.SiteSummaryListAPIView.as_view(), name='site-list'),
path('analytics/sites/<int:siteId>/summary', views.SiteSummaryDetailAPIView.as_view(), name='site-detail'),
path('analytics/sites/summary', views.SiteSummaryListAPIView.as_view(), name='site-summary-list'),
path('analytics/sites/<int:siteId>/summary', views.SiteSummaryDetailAPIView.as_view(), name='site-summary-detail'),

# Batches
path('analytics/batches/', views.BatchListAPIView.as_view(), name='batch-list'),
Expand All @@ -54,11 +53,12 @@
## Map

# Coordinate
path('map/sites/', views.MapSiteListAPIView.as_view(), name='coordinate-list-sites'),
path('map/sites/', views.SiteMapListAPIView.as_view(), name='coordinate-list-sites'),

# User
path('users/', views.UserListAPIView.as_view(), name='user-list'),
path('users/<int:userId>/', views.UserDetailAPIView.as_view(), name='user-detail'),
path('users/current_user/', views.UserCurrentUserAPIView.as_view(), name='current-user'),

# SWAGGER
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
Expand Down
Loading

0 comments on commit b2e9d88

Please sign in to comment.