Skip to content

Commit 41b3585

Browse files
authored
Merge pull request #282 from Exifly/main
Bump v2.2.4
2 parents 93172b5 + 14a08c1 commit 41b3585

21 files changed

+572
-399
lines changed

.env.dev

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml
2-
COMPOSE_PROJECT_NAME=apivault
2+
COMPOSE_PROJECT_NAME=apivault
3+
DEBUG=true

API_LIST.md

+2
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,7 @@
12401240
| [Judge0 CE](https://ce.judge0.com/) | Online code execution system | apiKey | True | unknown |
12411241
| [KONTESTS](https://kontests.net/api) | For upcoming and ongoing competitive coding contests | | True | unknown |
12421242
| [Mintlify](https://docs.mintlify.com) | For programmatically generating documentation for code | apiKey | True | yes |
1243+
| [Pythonium](https://pythonium.net/linter) | Python code validation | | True | no |
12431244

12441245
# Science & Math
12451246

@@ -1447,6 +1448,7 @@
14471448
| [Randommer](https://randommer.io/randommer-api) | Random data generator | apiKey | True | yes |
14481449
| [RandomUser](https://randomuser.me) | Generates and list user data | | True | unknown |
14491450
| [RoboHash](https://robohash.org/) | Generate random robot/alien avatars | | True | unknown |
1451+
| [Softwium](https://softwium.com/fake-api/) | APIs collection to get fake data | | True | no |
14501452
| [Spanish random names](https://random-names-api.herokuapp.com/public) | Generate spanish names (with gender) randomly | | True | unknown |
14511453
| [Spanish random words](https://palabras-aleatorias-public-api.herokuapp.com) | Generate spanish words randomly | | True | unknown |
14521454
| [This Person Does not Exist](https://thispersondoesnotexist.com) | Generates real-life faces of people who do not exist | | True | unknown |

backend/apivault/settings.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
environ.Env.read_env()
2121

2222
# Build paths inside the project like this: BASE_DIR / 'subdir'.
23-
BASE_DIR = Path(__file__).resolve().parent.parent
23+
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
24+
2425
MEDIA_ROOT = ''
2526
MEDIA_URL = ''
2627

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

3334
# SECURITY WARNING: don't run with debug turned on in production!
34-
DEBUG = False
35+
DEBUG = env('DEBUG')
3536

3637

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

208-
STATIC_URL = 'static/'
209-
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
209+
STATIC_URL = '/static/'
210+
211+
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
210212

211213

212214

@@ -224,3 +226,6 @@
224226
AUTHENTICATION_BACKENDS = (
225227
'django.contrib.auth.backends.ModelBackend',
226228
)
229+
230+
CSRF_TRUSTED_ORIGINS = ['https://*.apivault.dev', 'http://localhost']
231+

backend/apivault/urls.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""apivault URL Configuration"""
2-
from drf_spectacular.views import SpectacularSwaggerView
2+
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
33
from django.conf.urls.static import static
44
from django.contrib import admin
55
from django.conf import settings
@@ -16,7 +16,6 @@
1616
path('api/interaction', include('interaction.urls')),
1717

1818
#documentation
19+
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
1920
path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
20-
]
21-
22-
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
21+
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

backend/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
- DB_USER=apivault
3535
- DB_PASSWORD=apivault
3636
- DB_PORT=5432
37-
- DEBUG=true
37+
- DEBUG=${DEBUG}
3838
depends_on:
3939
- db_postgis_apivault
4040
volumes:

backend/interaction/urls.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
from .api import LikeAPIView, FeedbackView
33

44
urlpatterns = [
5-
path('/like/<int:api_id>/', LikeAPIView.as_view(), name='like-api'),
6-
path('/feedback/', FeedbackView.as_view(), name='feedback')
5+
path('/like/<int:api_id>', LikeAPIView.as_view(), name='like-api'),
6+
path('/feedback', FeedbackView.as_view(), name='feedback')
77
]

backend/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ charset-normalizer==3.1.0
99
click==8.1.3
1010
click-plugins==1.1.1
1111
cligj==0.7.2
12-
cryptography==41.0.3
12+
cryptography==41.0.4
1313
dbus-python==1.2.16
1414
defusedxml==0.7.1
1515
distro-info===0.23ubuntu1
@@ -67,5 +67,5 @@ sqlparse==0.4.4
6767
typing-extensions==4.6.3
6868
unattended-upgrades==0.1
6969
uritemplate==4.1.1
70-
urllib3==1.26.5
70+
urllib3==1.26.17
7171
zipp==3.16.2

backend/vault/urls.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
)
1515

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

1919
path('search', APISearchView.as_view(), name='api_search'),
20-
path('random/', RandomAPIListView.as_view()),
21-
path('create/', APICreateView.as_view()),
22-
path('count/', APICountView.as_view()),
23-
path('all/', APIListView.as_view()),
20+
path('random', RandomAPIListView.as_view()),
21+
path('create', APICreateView.as_view()),
22+
path('count', APICountView.as_view()),
23+
path('all', APIListView.as_view()),
2424

25-
path('my_api/', MyApiView.as_view()),
26-
path('pending/my_api/', MyPendingApiView.as_view()),
25+
path('my_api', MyApiView.as_view()),
26+
path('pending/my_api', MyPendingApiView.as_view()),
2727

28-
path('category/<str:category_name>/', CategoryAPIListView.as_view()),
29-
path('categories/trending/', TrendingCategoriesView.as_view()),
30-
path('categories/', AllCategoryAPIListView.as_view()),
28+
path('category/<str:category_name>', CategoryAPIListView.as_view()),
29+
path('categories/trending', TrendingCategoriesView.as_view()),
30+
path('categories', AllCategoryAPIListView.as_view()),
3131
]

docker-compose.dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
- DB_USER=apivault
3535
- DB_PASSWORD=apivault
3636
- DB_PORT=5432
37-
- DEBUG=true
37+
- DEBUG=${DEBUG}
3838
command: sh -c "python3 backend/docker/command/start_server.py"
3939
networks:
4040
apivault-network:

frontend/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ dist-ssr
2525
env
2626
.env
2727

28+
# Static files
29+
backend/staticfiles/
30+
2831
# Editor directories and files
2932
.vscode/*
3033
!.vscode/extensions.json

frontend/.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": false,
4+
"semi": false,
5+
"singleQuote": true
6+
}

frontend/components/Footer.vue

+96-96
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,125 @@
11
<template>
2-
<footer
3-
class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4"
4-
>
5-
<p class="col-md-4 mb-0 text-wrapper-no-hover">
6-
&copy; 2023 Exifly
7-
<br />
8-
Coded by those
9-
<NuxtLink
10-
class="text-wrapper-authors"
11-
style="text-decoration: none; font-weight: 600"
12-
to="/contributors"
13-
>
14-
wonderful people
15-
</NuxtLink>
16-
</p>
17-
18-
<NuxtLink
19-
to="/"
20-
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"
2+
<footer
3+
class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4"
214
>
22-
<img :src="logoMode" alt="" width="30" height="30" />
23-
</NuxtLink>
5+
<p class="col-md-4 mb-0 text-wrapper-no-hover">
6+
2024 &copy; Exifly
7+
<br />
8+
Coded by those
9+
<NuxtLink
10+
class="text-wrapper-authors"
11+
style="text-decoration: none; font-weight: 600"
12+
to="/contributors"
13+
>
14+
wonderful people
15+
</NuxtLink>
16+
</p>
2417

25-
<ul class="nav col-md-4 justify-content-end">
26-
<li class="nav-item">
27-
<a
28-
id="emailSupport"
29-
title="Send us an Email"
30-
tabindex="3"
31-
href="mailto:info@exifly.it"
32-
class="nav-link px-2 text-wrapper"
33-
target="_blank"
34-
>{{ packageJson.version }}</a
35-
>
36-
</li>
37-
<li class="nav-item">
38-
<a
39-
id="githubRepository"
40-
title="Check out our github repository"
41-
tabindex="4"
42-
href="https://github.com/Exifly/ApiVault"
43-
class="nav-link px-2 text-wrapper"
44-
target="_blank"
45-
><font-awesome-icon :icon="['fab', 'github']"
46-
/></a>
47-
</li>
48-
<li class="nav-item">
49-
<a
50-
title="Send us an Email"
51-
tabindex="5"
52-
href="mailto:info@exifly.it"
53-
class="nav-link px-2 text-wrapper"
54-
target="_blank"
55-
>Contact</a
56-
>
57-
</li>
58-
<li class="nav-item">
59-
<a
60-
title="Sponsor APIVault"
61-
tabindex="6"
62-
href="https://ko-fi.com/apivault"
63-
class="nav-link px-2 text-wrapper"
64-
target="_blank"
65-
>Sponsor</a
66-
>
67-
</li>
68-
<li class="nav-item">
6918
<NuxtLink
70-
title="Apivault Cookie Policy"
71-
tabindex="7"
72-
to="/cookie-policy"
73-
class="nav-link px-2 text-wrapper"
74-
>Cookie Policy</NuxtLink
19+
to="/"
20+
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"
7521
>
76-
</li>
77-
<li class="nav-item">
78-
<NuxtLink
79-
title="Apivault Privacy Policy"
80-
tabindex="8"
81-
to="/privacy-policy"
82-
class="nav-link px-2 text-wrapper"
83-
>Privacy Policy</NuxtLink
84-
>
85-
</li>
86-
</ul>
87-
</footer>
22+
<img :src="logoMode" alt="" width="30" height="30" />
23+
</NuxtLink>
24+
25+
<ul class="nav col-md-4 justify-content-end">
26+
<li class="nav-item">
27+
<a
28+
id="emailSupport"
29+
title="Send us an Email"
30+
tabindex="3"
31+
href="mailto:info@exifly.it"
32+
class="nav-link px-2 text-wrapper"
33+
target="_blank"
34+
>{{ packageJson.version }}</a
35+
>
36+
</li>
37+
<li class="nav-item">
38+
<a
39+
id="githubRepository"
40+
title="Check out our github repository"
41+
tabindex="4"
42+
href="https://github.com/Exifly/ApiVault"
43+
class="nav-link px-2 text-wrapper"
44+
target="_blank"
45+
><font-awesome-icon :icon="['fab', 'github']"
46+
/></a>
47+
</li>
48+
<li class="nav-item">
49+
<a
50+
title="Send us an Email"
51+
tabindex="5"
52+
href="mailto:info@exifly.it"
53+
class="nav-link px-2 text-wrapper"
54+
target="_blank"
55+
>Contact</a
56+
>
57+
</li>
58+
<li class="nav-item">
59+
<a
60+
title="Sponsor APIVault"
61+
tabindex="6"
62+
href="https://ko-fi.com/apivault"
63+
class="nav-link px-2 text-wrapper"
64+
target="_blank"
65+
>Sponsor</a
66+
>
67+
</li>
68+
<li class="nav-item">
69+
<NuxtLink
70+
title="Apivault Cookie Policy"
71+
tabindex="7"
72+
to="/cookie-policy"
73+
class="nav-link px-2 text-wrapper"
74+
>Cookie Policy</NuxtLink
75+
>
76+
</li>
77+
<li class="nav-item">
78+
<NuxtLink
79+
title="Apivault Privacy Policy"
80+
tabindex="8"
81+
to="/privacy-policy"
82+
class="nav-link px-2 text-wrapper"
83+
>Privacy Policy</NuxtLink
84+
>
85+
</li>
86+
</ul>
87+
</footer>
8888
</template>
8989

9090
<script setup lang="ts">
91-
import packageJson from "../package.json";
91+
import packageJson from '../package.json'
9292
93-
const theme = useState("APIVaultTheme", () =>
94-
process.client ? localStorage.getItem("APIVaultTheme")! : "dark"
95-
);
93+
const theme = useState('APIVaultTheme', () =>
94+
process.client ? localStorage.getItem('APIVaultTheme')! : 'dark'
95+
)
9696
9797
const logoMode = computed(() => {
98-
if (theme!.value === "dark" || theme.value === null) {
99-
return "/img/apivault-dark-nobg.png";
100-
}
101-
return "/img/apivault-light-nobg.png";
102-
});
98+
if (theme!.value === 'dark' || theme.value === null) {
99+
return '/img/apivault-dark-nobg.png'
100+
}
101+
return '/img/apivault-light-nobg.png'
102+
})
103103
</script>
104104

105105
<style scoped>
106106
.text-wrapper {
107-
color: var(--text-color);
107+
color: var(--text-color);
108108
}
109109
110110
.text-wrapper:hover {
111-
color: var(--text-color-hover);
111+
color: var(--text-color-hover);
112112
}
113113
114114
.text-wrapper-no-hover {
115-
color: var(--text-color);
115+
color: var(--text-color);
116116
}
117117
118118
.text-wrapper-authors {
119-
color: rgb(3, 155, 178);
119+
color: rgb(3, 155, 178);
120120
}
121121
122122
.text-wrapper-authors:hover {
123-
color: rgb(0, 201, 232);
123+
color: rgb(0, 201, 232);
124124
}
125125
</style>

0 commit comments

Comments
 (0)