Skip to content

Commit

Permalink
Merge pull request #188 from seanmorley15/development
Browse files Browse the repository at this point in the history
Fix adventure cards and serializers
  • Loading branch information
seanmorley15 authored Aug 13, 2024
2 parents 0a6a401 + ffe9d6f commit fc9e755
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/server/adventures/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def to_representation(self, instance):
representation = super().to_representation(instance)
if instance.image:
public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/')
print(public_url)
#print(public_url)
# remove any ' from the url
public_url = public_url.replace("'", "")
representation['image'] = f"{public_url}/media/{instance.image.name}"
Expand Down
2 changes: 1 addition & 1 deletion backend/server/users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def to_representation(self, instance):
representation = super().to_representation(instance)
if instance.profile_pic:
public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/')
print(public_url)
#print(public_url)
# remove any ' from the url
public_url = public_url.replace("'", "")
representation['profile_pic'] = f"{public_url}/media/{instance.profile_pic.name}"
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: "3.9"

services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
build: ./frontend/
#image: ghcr.io/seanmorley15/adventurelog-frontend:latest
environment:
- PUBLIC_SERVER_URL=http://server:8000
- ORIGIN=http://localhost:8080
Expand All @@ -23,8 +23,8 @@ services:
- postgres_data:/var/lib/postgresql/data/

server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
build: ./backend/
#image: ghcr.io/seanmorley15/adventurelog-backend:latest
environment:
- PGHOST=db
- PGDATABASE=database
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/AdventureCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<div class="flex justify-between">
<button
on:click={() => goto(`/adventures/${adventure.id}`)}
class="text-2xl font-semibold -mt-2 break-words text-wrap hover:underline"
class="text-2xl font-semibold -mt-2 break-words text-wrap hover:underline text-left"
>
{adventure.name}
</button>
Expand Down

0 comments on commit fc9e755

Please sign in to comment.