Skip to content

Commit

Permalink
Merge pull request #282 from Exifly/main
Browse files Browse the repository at this point in the history
Bump v2.2.4
  • Loading branch information
gdjohn4s authored Sep 6, 2024
2 parents 93172b5 + 14a08c1 commit 41b3585
Show file tree
Hide file tree
Showing 21 changed files with 572 additions and 399 deletions.
3 changes: 2 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml
COMPOSE_PROJECT_NAME=apivault
COMPOSE_PROJECT_NAME=apivault
DEBUG=true
2 changes: 2 additions & 0 deletions API_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@
| [Judge0 CE](https://ce.judge0.com/) | Online code execution system | apiKey | True | unknown |
| [KONTESTS](https://kontests.net/api) | For upcoming and ongoing competitive coding contests | | True | unknown |
| [Mintlify](https://docs.mintlify.com) | For programmatically generating documentation for code | apiKey | True | yes |
| [Pythonium](https://pythonium.net/linter) | Python code validation | | True | no |

# Science & Math

Expand Down Expand Up @@ -1447,6 +1448,7 @@
| [Randommer](https://randommer.io/randommer-api) | Random data generator | apiKey | True | yes |
| [RandomUser](https://randomuser.me) | Generates and list user data | | True | unknown |
| [RoboHash](https://robohash.org/) | Generate random robot/alien avatars | | True | unknown |
| [Softwium](https://softwium.com/fake-api/) | APIs collection to get fake data | | True | no |
| [Spanish random names](https://random-names-api.herokuapp.com/public) | Generate spanish names (with gender) randomly | | True | unknown |
| [Spanish random words](https://palabras-aleatorias-public-api.herokuapp.com) | Generate spanish words randomly | | True | unknown |
| [This Person Does not Exist](https://thispersondoesnotexist.com) | Generates real-life faces of people who do not exist | | True | unknown |
Expand Down
13 changes: 9 additions & 4 deletions backend/apivault/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
environ.Env.read_env()

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent

MEDIA_ROOT = ''
MEDIA_URL = ''

Expand All @@ -31,7 +32,7 @@
SECRET_KEY = 'django-insecure-pnadu&92%d==xohx_27-z%is=nb7c&s!ph7#1r$i0d#oxttgh5'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = env('DEBUG')


ALLOWED_HOSTS = ['*']
Expand Down Expand Up @@ -205,8 +206,9 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/

STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')



Expand All @@ -224,3 +226,6 @@
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
)

CSRF_TRUSTED_ORIGINS = ['https://*.apivault.dev', 'http://localhost']

7 changes: 3 additions & 4 deletions backend/apivault/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""apivault URL Configuration"""
from drf_spectacular.views import SpectacularSwaggerView
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
from django.conf.urls.static import static
from django.contrib import admin
from django.conf import settings
Expand All @@ -16,7 +16,6 @@
path('api/interaction', include('interaction.urls')),

#documentation
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
2 changes: 1 addition & 1 deletion backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
- DB_USER=apivault
- DB_PASSWORD=apivault
- DB_PORT=5432
- DEBUG=true
- DEBUG=${DEBUG}
depends_on:
- db_postgis_apivault
volumes:
Expand Down
4 changes: 2 additions & 2 deletions backend/interaction/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
from .api import LikeAPIView, FeedbackView

urlpatterns = [
path('/like/<int:api_id>/', LikeAPIView.as_view(), name='like-api'),
path('/feedback/', FeedbackView.as_view(), name='feedback')
path('/like/<int:api_id>', LikeAPIView.as_view(), name='like-api'),
path('/feedback', FeedbackView.as_view(), name='feedback')
]
4 changes: 2 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ charset-normalizer==3.1.0
click==8.1.3
click-plugins==1.1.1
cligj==0.7.2
cryptography==41.0.3
cryptography==41.0.4
dbus-python==1.2.16
defusedxml==0.7.1
distro-info===0.23ubuntu1
Expand Down Expand Up @@ -67,5 +67,5 @@ sqlparse==0.4.4
typing-extensions==4.6.3
unattended-upgrades==0.1
uritemplate==4.1.1
urllib3==1.26.5
urllib3==1.26.17
zipp==3.16.2
20 changes: 10 additions & 10 deletions backend/vault/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
)

urlpatterns = [
path('detail/<int:pk>/', APIDetailView.as_view(), name='api_detail'),
path('detail/<int:pk>', APIDetailView.as_view(), name='api_detail'),

path('search', APISearchView.as_view(), name='api_search'),
path('random/', RandomAPIListView.as_view()),
path('create/', APICreateView.as_view()),
path('count/', APICountView.as_view()),
path('all/', APIListView.as_view()),
path('random', RandomAPIListView.as_view()),
path('create', APICreateView.as_view()),
path('count', APICountView.as_view()),
path('all', APIListView.as_view()),

path('my_api/', MyApiView.as_view()),
path('pending/my_api/', MyPendingApiView.as_view()),
path('my_api', MyApiView.as_view()),
path('pending/my_api', MyPendingApiView.as_view()),

path('category/<str:category_name>/', CategoryAPIListView.as_view()),
path('categories/trending/', TrendingCategoriesView.as_view()),
path('categories/', AllCategoryAPIListView.as_view()),
path('category/<str:category_name>', CategoryAPIListView.as_view()),
path('categories/trending', TrendingCategoriesView.as_view()),
path('categories', AllCategoryAPIListView.as_view()),
]
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
- DB_USER=apivault
- DB_PASSWORD=apivault
- DB_PORT=5432
- DEBUG=true
- DEBUG=${DEBUG}
command: sh -c "python3 backend/docker/command/start_server.py"
networks:
apivault-network:
Expand Down
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ dist-ssr
env
.env

# Static files
backend/staticfiles/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
6 changes: 6 additions & 0 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 4,
"useTabs": false,
"semi": false,
"singleQuote": true
}
192 changes: 96 additions & 96 deletions frontend/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,125 +1,125 @@
<template>
<footer
class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4"
>
<p class="col-md-4 mb-0 text-wrapper-no-hover">
&copy; 2023 Exifly
<br />
Coded by those
<NuxtLink
class="text-wrapper-authors"
style="text-decoration: none; font-weight: 600"
to="/contributors"
>
wonderful people
</NuxtLink>
</p>

<NuxtLink
to="/"
class="col-md-4 d-flex align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none"
<footer
class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4"
>
<img :src="logoMode" alt="" width="30" height="30" />
</NuxtLink>
<p class="col-md-4 mb-0 text-wrapper-no-hover">
2024 &copy; Exifly
<br />
Coded by those
<NuxtLink
class="text-wrapper-authors"
style="text-decoration: none; font-weight: 600"
to="/contributors"
>
wonderful people
</NuxtLink>
</p>

<ul class="nav col-md-4 justify-content-end">
<li class="nav-item">
<a
id="emailSupport"
title="Send us an Email"
tabindex="3"
href="mailto:info@exifly.it"
class="nav-link px-2 text-wrapper"
target="_blank"
>{{ packageJson.version }}</a
>
</li>
<li class="nav-item">
<a
id="githubRepository"
title="Check out our github repository"
tabindex="4"
href="https://github.com/Exifly/ApiVault"
class="nav-link px-2 text-wrapper"
target="_blank"
><font-awesome-icon :icon="['fab', 'github']"
/></a>
</li>
<li class="nav-item">
<a
title="Send us an Email"
tabindex="5"
href="mailto:info@exifly.it"
class="nav-link px-2 text-wrapper"
target="_blank"
>Contact</a
>
</li>
<li class="nav-item">
<a
title="Sponsor APIVault"
tabindex="6"
href="https://ko-fi.com/apivault"
class="nav-link px-2 text-wrapper"
target="_blank"
>Sponsor</a
>
</li>
<li class="nav-item">
<NuxtLink
title="Apivault Cookie Policy"
tabindex="7"
to="/cookie-policy"
class="nav-link px-2 text-wrapper"
>Cookie Policy</NuxtLink
to="/"
class="col-md-4 d-flex align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none"
>
</li>
<li class="nav-item">
<NuxtLink
title="Apivault Privacy Policy"
tabindex="8"
to="/privacy-policy"
class="nav-link px-2 text-wrapper"
>Privacy Policy</NuxtLink
>
</li>
</ul>
</footer>
<img :src="logoMode" alt="" width="30" height="30" />
</NuxtLink>

<ul class="nav col-md-4 justify-content-end">
<li class="nav-item">
<a
id="emailSupport"
title="Send us an Email"
tabindex="3"
href="mailto:info@exifly.it"
class="nav-link px-2 text-wrapper"
target="_blank"
>{{ packageJson.version }}</a
>
</li>
<li class="nav-item">
<a
id="githubRepository"
title="Check out our github repository"
tabindex="4"
href="https://github.com/Exifly/ApiVault"
class="nav-link px-2 text-wrapper"
target="_blank"
><font-awesome-icon :icon="['fab', 'github']"
/></a>
</li>
<li class="nav-item">
<a
title="Send us an Email"
tabindex="5"
href="mailto:info@exifly.it"
class="nav-link px-2 text-wrapper"
target="_blank"
>Contact</a
>
</li>
<li class="nav-item">
<a
title="Sponsor APIVault"
tabindex="6"
href="https://ko-fi.com/apivault"
class="nav-link px-2 text-wrapper"
target="_blank"
>Sponsor</a
>
</li>
<li class="nav-item">
<NuxtLink
title="Apivault Cookie Policy"
tabindex="7"
to="/cookie-policy"
class="nav-link px-2 text-wrapper"
>Cookie Policy</NuxtLink
>
</li>
<li class="nav-item">
<NuxtLink
title="Apivault Privacy Policy"
tabindex="8"
to="/privacy-policy"
class="nav-link px-2 text-wrapper"
>Privacy Policy</NuxtLink
>
</li>
</ul>
</footer>
</template>

<script setup lang="ts">
import packageJson from "../package.json";
import packageJson from '../package.json'
const theme = useState("APIVaultTheme", () =>
process.client ? localStorage.getItem("APIVaultTheme")! : "dark"
);
const theme = useState('APIVaultTheme', () =>
process.client ? localStorage.getItem('APIVaultTheme')! : 'dark'
)
const logoMode = computed(() => {
if (theme!.value === "dark" || theme.value === null) {
return "/img/apivault-dark-nobg.png";
}
return "/img/apivault-light-nobg.png";
});
if (theme!.value === 'dark' || theme.value === null) {
return '/img/apivault-dark-nobg.png'
}
return '/img/apivault-light-nobg.png'
})
</script>

<style scoped>
.text-wrapper {
color: var(--text-color);
color: var(--text-color);
}
.text-wrapper:hover {
color: var(--text-color-hover);
color: var(--text-color-hover);
}
.text-wrapper-no-hover {
color: var(--text-color);
color: var(--text-color);
}
.text-wrapper-authors {
color: rgb(3, 155, 178);
color: rgb(3, 155, 178);
}
.text-wrapper-authors:hover {
color: rgb(0, 201, 232);
color: rgb(0, 201, 232);
}
</style>
Loading

0 comments on commit 41b3585

Please sign in to comment.