Skip to content

Commit

Permalink
trying our best
Browse files Browse the repository at this point in the history
  • Loading branch information
cristim67 committed Apr 12, 2024
1 parent 2176590 commit 9743271
Show file tree
Hide file tree
Showing 10 changed files with 1,359 additions and 575 deletions.
1,654 changes: 1,261 additions & 393 deletions client/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@genezio/auth": "^2.0.13",
"@genezio-sdk/dev-apv": "^1.0.0-prod",
"@genezio/auth": "2.0.13",
"@genezio/vite-plugin-genezio": "^1.0.4",
"@react-oauth/google": "^0.12.1",
"@types/styled-components": "^5.1.34",
Expand Down
1 change: 0 additions & 1 deletion client/src/components/RaceRegistration.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const RaceRegistration: React.FC = () => {

const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
await BackendService.updateUser(registration.phoneNumber, registration.tshirtSize);
await BackendService.addRaces(registration.race, registration.phoneNumber, registration.tshirtSize, registration.paymentMethod); // Actualizăm pentru a include și metoda de plată

alert('Înscrierea a fost realizată cu succes!');
Expand Down
2 changes: 0 additions & 2 deletions client/src/views/Login.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ const Login: React.FC = () => {
try {
await AuthService.getInstance().googleRegistration(credentialResponse.credential!);

await BackendService.addUser();

const allRace = await BackendService.getRaces();

if (localStorage.getItem("token") && allRace.length === 0) {
Expand Down
1 change: 1 addition & 0 deletions genezio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ frontend:
deploy:
- npm install @genezio-sdk/dev-apv
- npm install
local: npm i
# List of scripts that build your frontend before deployment. It should populate the specified `publish` directory.
build: npm run build
# List of scripts to run when starting the local development server.
Expand Down
90 changes: 0 additions & 90 deletions package-lock.json

This file was deleted.

5 changes: 0 additions & 5 deletions package.json

This file was deleted.

2 changes: 2 additions & 0 deletions server/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export class BackendService {

}



@GenezioAuth()
async addRaces(context: GnzContext, races: string, phone:string,marime:string,revolut:string){
try {
Expand Down
Loading

0 comments on commit 9743271

Please sign in to comment.