Skip to content

Commit

Permalink
Merge branch 'main' into feature/add-user-login-page
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-Therrien-Beslogic authored Mar 23, 2024
2 parents 4cdb678 + 00492e1 commit bc709eb
Show file tree
Hide file tree
Showing 7 changed files with 2,616 additions and 2,492 deletions.
2 changes: 1 addition & 1 deletion canopeum_backend/canopeum_backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"USER": "root",
"PASSWORD": "canopeum",
"HOST": "localhost",
"PORT": "3306",
"PORT": "3308", # Same as in docker-compose.yml
},
}

Expand Down
7 changes: 2 additions & 5 deletions canopeum_backend/canopeum_backend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,8 @@ class PostListAPIView(APIView):
def get(self, request):
comment_count = Comment.objects.filter(post=request.data.get("id")).count()
has_liked = 0
siteId = request.GET.get("siteId", "")
if siteId != "":
posts = Post.objects.filter(site=siteId)
else:
posts = Post.objects.all()
site_id = request.GET.get("siteId", "")
posts = Post.objects.filter(site=site_id) if not site_id else Post.objects.all()
serializer = PostSerializer(posts, many=True, context={"comment_count": comment_count, "has_liked": has_liked})
return Response(serializer.data)

Expand Down
4 changes: 3 additions & 1 deletion canopeum_frontend/src/pages/MapSite.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { useParams } from 'react-router-dom'

const MapSite = () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- We plan on using it
/* eslint-disable @typescript-eslint/no-unused-vars -- We plan on using it */
// @ts-expect-error: We plan on using it
const { siteId } = useParams()
/* eslint-enable @typescript-eslint/no-unused-vars */

return (
<div>
Expand Down
Loading

0 comments on commit bc709eb

Please sign in to comment.