14 Commits

Author SHA1 Message Date
3d9e2b1977 fix: back add cors
Some checks failed
Build Docker Image Front / run (pull_request) Successful in 25s
Build Docker Image Back / run (pull_request) Successful in 1m8s
JsDocs / coverage (pull_request) Successful in 40s
Test and coverage / coverage (pull_request) Failing after 1m44s
2024-05-22 14:38:44 +02:00
aae4f97ff4 feat: add bru update for prod test
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 24s
Build Docker Image Back / run (pull_request) Successful in 24s
JsDocs / coverage (pull_request) Successful in 23s
Test and coverage / coverage (pull_request) Successful in 1m37s
2024-05-22 10:02:18 +02:00
7f9a9965d2 fix: prod env
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 27s
Build Docker Image Back / run (pull_request) Successful in 23s
JsDocs / coverage (pull_request) Successful in 23s
Test and coverage / coverage (pull_request) Successful in 1m21s
2024-05-21 17:04:50 +02:00
f4a2e8cbf9 fix: env var and conf file
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m34s
Build Docker Image Back / run (pull_request) Successful in 23s
JsDocs / coverage (pull_request) Successful in 22s
Test and coverage / coverage (pull_request) Successful in 1m26s
2024-05-21 16:15:46 +02:00
0fec2417a9 fix astro output type 2024-05-21 16:15:12 +02:00
7f1986e765 fix: docker compose for prod
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 27s
Build Docker Image Back / run (pull_request) Successful in 23s
JsDocs / coverage (pull_request) Successful in 25s
Test and coverage / coverage (pull_request) Successful in 1m37s
2024-05-21 16:14:09 +02:00
07ee4b9e57 fix tailwind merge error
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m56s
Build Docker Image Back / run (pull_request) Successful in 24s
JsDocs / coverage (pull_request) Successful in 25s
Test and coverage / coverage (pull_request) Successful in 1m31s
2024-05-21 16:01:00 +02:00
20ebad74fb add div class to input
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m33s
Build Docker Image Back / run (pull_request) Successful in 24s
JsDocs / coverage (pull_request) Successful in 24s
Test and coverage / coverage (pull_request) Successful in 1m44s
2024-05-21 12:24:45 +02:00
aec568d0c7 change class to div class
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m31s
Build Docker Image Back / run (pull_request) Successful in 22s
JsDocs / coverage (pull_request) Successful in 22s
Test and coverage / coverage (pull_request) Successful in 1m40s
2024-05-21 12:24:23 +02:00
0849ffe42c fix: type issue
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m30s
Build Docker Image Back / run (pull_request) Successful in 23s
JsDocs / coverage (pull_request) Successful in 22s
Test and coverage / coverage (pull_request) Successful in 1m31s
2024-05-21 12:13:39 +02:00
e13cb9bbb9 add imput composant
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m34s
Build Docker Image Back / run (pull_request) Successful in 24s
JsDocs / coverage (pull_request) Successful in 23s
Test and coverage / coverage (pull_request) Successful in 1m41s
2024-05-21 11:42:42 +02:00
c348e2b2ac fix: tailwing config 2024-05-21 11:42:14 +02:00
c93141e68f fix: prod issue
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m58s
Build Docker Image Back / run (pull_request) Successful in 23s
JsDocs / coverage (pull_request) Successful in 23s
Test and coverage / coverage (pull_request) Successful in 1m41s
2024-05-21 11:34:19 +02:00
2ecc5c86ca fix: remove ex register form 2024-05-21 11:07:36 +02:00
17 changed files with 105 additions and 62 deletions

View File

@ -8,6 +8,7 @@
"@types/express": "^4.17.21",
"@types/node": "^20.12.7",
"axios": "^1.6.8",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"rimraf": "^5.0.5",
@ -15,6 +16,7 @@
"swagger-ui-express": "^5.0.0"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/jest": "^29.5.12",
"@types/rewire": "^2.5.30",
"@types/supertest": "^6.0.2",
@ -1968,6 +1970,15 @@
"integrity": "sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==",
"dev": true
},
"node_modules/@types/cors": {
"version": "2.8.17",
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz",
"integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/express": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz",
@ -4745,6 +4756,18 @@
"dev": true,
"optional": true
},
"node_modules/cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dependencies": {
"object-assign": "^4",
"vary": "^1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/create-jest": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
@ -9248,7 +9271,6 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}

View File

@ -14,6 +14,7 @@
"@types/express": "^4.17.21",
"@types/node": "^20.12.7",
"axios": "^1.6.8",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"rimraf": "^5.0.5",
@ -21,6 +22,7 @@
"swagger-ui-express": "^5.0.0"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/jest": "^29.5.12",
"@types/rewire": "^2.5.30",
"@types/supertest": "^6.0.2",

View File

@ -1,11 +1,13 @@
import { getCity, getRadius, getPoiId, getBox } from "./openTripMaps"
import express from "express"
import cors from "cors"
/**
* Initialize Express application instance.
* @returns An initialized Express application object.
*/
const app = express()
app.use(cors())
/**

View File

@ -135,8 +135,9 @@ export async function getCity(req: express.Request, res: express.Response) {
radius = "1000"
}
const cityPose = await callCity(cityName as string)
res.send( await callRadius(cityPose.lon,cityPose.lat, radius as string))
}
const poi = await callRadius(cityPose.lon,cityPose.lat, radius as string)
res.send( {...poi, ...cityPose})
}//XXX: refaire test avec city
/**
* Handle GET request for radius search route ('/otm/radius').

View File

@ -1,5 +1,6 @@
vars {
TRIPMAP_URL: https://api.opentripmap.com/0.1
EXPRESS_API: http://localhost:3001
}
vars:secret [
app_key,

View File

@ -0,0 +1,3 @@
vars {
EXPRESS_API: https://drink-tweb.cb85.fr
}

View File

@ -5,7 +5,7 @@ meta {
}
get {
url: http://localhost:3001/otm/city?name=La roche sur yon&radius=300
url: {{EXPRESS_API}}/otm/city?name=La roche sur yon&radius=300
body: none
auth: none
}

View File

@ -18,7 +18,9 @@ services:
- public
front:
image: git.lab-ouest.org/epitech/ratrapage_t-web_front:pr-1-head
image: git.lab-ouest.org/epitech/ratrapage_t-web_front:pr-16-head
environment:
- POCKETBASE_URL=https://${POCKET_BASE_URL}
depends_on:
- pocketbase
labels:
@ -30,9 +32,10 @@ services:
- public
back_drink:
image: git.lab-ouest.org/epitech/ratrapage_t-web_back:pr-6-head
image: git.lab-ouest.org/epitech/ratrapage_t-web_back:master
environment:
- port=${BACK_BASE_PORT}
- OPEN_TRIP_MAPS_KEY=${OPEN_TRIP_MAPS_KEY}
labels:
- traefik.enable=true
- traefik.http.routers.expressDrinkTweb.rule=Host(`${DRINK_URL}`)

View File

@ -27,6 +27,7 @@ const whenExternalScripts = (items = []) =>
export default defineConfig({
output: 'server',
compressHTML: true,
build: {
assets: 'assets',
@ -37,7 +38,6 @@ export default defineConfig({
port: 3000
},
trailingSlash: 'never',
output: 'server',
adapter: node({
mode: 'standalone'
}),

View File

@ -34,7 +34,8 @@
"astro-icon": "^1.1.0",
"limax": "4.1.0",
"lodash.merge": "^4.6.2",
"unpic": "^3.18.0"
"unpic": "^3.18.0",
"tailwind-merge": "^2.3.0"
},
"devDependencies": {
"@astrojs/check": "^0",
@ -68,7 +69,6 @@
"reading-time": "^1.5.0",
"rehype-plugin-image-native-lazy-loading": "^1.2.0",
"sharp": "0.33.3",
"tailwind-merge": "^2.3.0",
"tailwindcss": "^3.4.3",
"typescript-eslint": "^7.9.0"
}

View File

@ -0,0 +1,28 @@
---
import type { Input as Props } from 'types';
const { type, name, label, autocomplete, placeholder, divClass, inputClass} = Astro.props;
---
<>
{
name && (
<div class={divClass}>
{label && (
<label for={name} class="block text-sm font-medium">
{label}
</label>
)}
<input
type={type}
name={name}
id={name}
autocomplete={autocomplete}
placeholder={placeholder}
class={"py-3 px-4 block w-full text-md rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900" + inputClass}
/>
</div>
)
}
</>

View File

@ -1,6 +1,6 @@
site:
name: AstroWind
site: 'https://astrowind.vercel.app'
name: EpicRoadTrip
site: 'https://front-tweb.cb85.fr'
base: '/'
trailingSlash: false

View File

@ -80,18 +80,4 @@ const metadata = {
]}
/>
<Oauth/>
<form id="account-creation" method="post" enctype="multipart/form-data">
<input type="hidden" name="type" value="userPassword">
<input required name="name" placeholder="Prénom Nom"/>
<input required name="username" placeholder="Pseudo"/>
<input required name="email" type="email" placeholder="Renseignez votre email" />
<input required name="password" type="password" placeholder="Créez un mot de passe" />
<input required name="passwordConfirm" type="password" placeholder="Confirmer votre mot de passe" />
<button>Créer un compte</button>
</form>
<button id="OauthDiscord">connexion avec discord</button>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="type" value="discord2FA">
</form>
</Layout>

View File

@ -1,5 +1,5 @@
import type { AstroComponentFactory } from 'astro/runtime/server/index.js'
import type { HTMLAttributes, ImageMetadata } from 'astro/types'
import type { HTMLAttributes, ImageMetadata, HTMLInputTypeAttribute } from 'astro/types'
export interface Post {
/** A unique ID number that identifies a post. */
@ -26,7 +26,7 @@ export interface Post {
/** */
category?: Taxonomy
/** */
tags?: Taxonomy[]
tags?: Array<Taxonomy>
/** */
author?: string
@ -167,6 +167,8 @@ export interface Input {
label?: string
autocomplete?: string
placeholder?: string
divClass?: string
inputClass?: string
}
export interface Textarea {

View File

@ -1,5 +1,5 @@
import defaultTheme from 'tailwindcss/defaultTheme';
import typographyPlugin from '@tailwindcss/typography';
import defaultTheme from 'tailwindcss/defaultTheme'
import typographyPlugin from '@tailwindcss/typography'
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,json,md,mdx,svelte,ts,tsx,vue}'],
@ -21,4 +21,5 @@ module.exports = {
},
plugins: [typographyPlugin],
darkMode: 'class',
};
}

View File

@ -1,8 +0,0 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [],
}