Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into search-implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
jans510 committed Dec 22, 2024
2 parents 35c75ca + db60762 commit a4f0826
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .requests/http-client.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"Lokal": {
"baseUrl": "http://localhost:8080",
"user": {
"email": "[email protected]",
"password": "CHANGEME"
}
},
"Test (test.dancier.net)": {
"baseUrl": "https://test-dancer.dancier.net",
"user": {
"email": "[email protected]",
"password": "CHANGEME"
}
}
}
47 changes: 47 additions & 0 deletions .requests/profile.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
### Login (run once to retrieve access token)
POST {{baseUrl}}/authentication/login
Content-Type: application/json

{
"email": "{{user.email}}",
"password": "{{user.password}}"
}
> {% client.global.set("access_token", response.body.accessToken); %}


### Get user's proile (and save it)
GET {{baseUrl}}/profile
Authorization: Bearer {{access_token}}

> {% client.global.set("profile", response.body.toString()); %}


### Save user's profile
PUT {{baseUrl}}/profile
Content-Type: application/json

{
"size": 130,
"gender": "FEMALE",
"birthDate": "1996-01-19",
"ableTo": [
{
"dance": "Tango",
"level": "BASIC",
"leading": "LEAD"
}
],
"wantsTo": [
{
"dance": "Tango",
"level": "INTERMEDIATE",
"leading": "FOLLOW"
}
],
"email": "[email protected]",
"zipCode": "10001",
"city": "Hamburg",
"country": "GER",
"profileImageHash": "1a7efd460ee0be68011291c9f6b1ac5d9b03f9974b66c27b14e59887bf910f8c",
"aboutMe": null
}
35 changes: 35 additions & 0 deletions .requests/register.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
### Perform Captcha to Login as Human
POST {{baseUrl}}/authentication/loginAsHuman
X-Captcha-Token: token

> {% client.global.set("access_token", response.body.accessToken); %}

### Perform initial registration
POST {{baseUrl}}/authentication/registrations
Content-Type: application/json

{
"acceptTermsAndConditions": true,
"email": "{{user.email}}",
"password": "{{user.password}}"

}

### verify email
PUT {{baseUrl}}/authentication/email-validations/asdf
Authorization: Bearer {{access_token}}

### Login with new user
POST {{baseUrl}}/authentication/login
Content-Type: application/json

{

}

> {% client.global.set("access_token", response.body.accessToken); %}


### Get user's profile
GET {{baseUrl}}/profile
Authorization: Bearer {{access_token}}
4 changes: 1 addition & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ Then in the project root folder create the following directories with the proper
````bash
# for the pg-admin volume
mkdir -p volumes/pg-admin-data
sudo chown 5050:5050 volumes/pg-admin-data

# for the kafka volume

mkdir -p volumes/kafka
sudo chown 1001:1001 volumes/kafka
````

You can now access the database GUI with your browser:
Expand All @@ -44,7 +42,7 @@ Here you can configure the connection to the postgres instance:
#### Without test and update the running docker environment
(assuming the docker-compose setup is up and running)
````bash
./mvnw clean install -DskipTests; docker-compose up --build -d dancer
./mvnw clean install -DskipTests; docker-compose up --build
````
#### Building with tests
````bash
Expand Down

0 comments on commit a4f0826

Please sign in to comment.