Compare commits

...

3 Commits

Author SHA1 Message Date
Struchkov Mark 9d5df57645
Refactor PersonRepositoryImpl class for better readability
The refactoring simplified the 'insertInto' method within the PersonRepositoryImpl class. Now, instead of transforming the item to a Multi and collecting the last item, it directly finds the person by Id. This change enhances the code's readability and maintainability.
2024-03-09 21:24:59 +03:00
Struchkov Mark 7c414bae64
Update Postman collection settings
The update involves removing user authentication requirements for "Registration" and "Login" in the Postman collection. Additionally, the User ID in the URL for a GET request and the bearer token value have been modified. These changes aim to ensure proper access to the required endpoints.
2024-03-09 21:24:47 +03:00
Struchkov Mark 8433cebb03
Switch dependency from panache to jOOQ in network-backend 2024-03-09 21:07:17 +03:00
3 changed files with 15 additions and 11 deletions

View File

@ -16,14 +16,14 @@
<groupId>dev.struchkov.network</groupId>
<artifactId>network-core</artifactId>
</dependency>
<dependency>
<groupId>dev.struchkov.network</groupId>
<artifactId>network-data-panache</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>dev.struchkov.network</groupId>-->
<!-- <artifactId>network-data-jooq</artifactId>-->
<!-- <artifactId>network-data-panache</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>dev.struchkov.network</groupId>
<artifactId>network-data-jooq</artifactId>
</dependency>
<dependency>
<groupId>dev.struchkov.network</groupId>
<artifactId>network-controller-rest</artifactId>

View File

@ -35,9 +35,7 @@ public class PersonRepositoryImpl implements PersonRepository {
return Uni.createFrom().item(dsl.insertInto(PERSON).set(mapper.toRecord(person)).getSQL(ParamType.NAMED_OR_INLINED))
.map(pgPool::query)
.flatMap(Query::execute)
.onItem().transformToMulti(RowSet::toMulti)
.collect().last()
.onItem().ifNotNull().transform(toDomain());
.flatMap(ignore -> findById(person.getId()));
}
@Override

View File

@ -15,6 +15,9 @@
{
"name": "Registration",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
@ -46,14 +49,14 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{host}}/myspace/user/018e2453-0121-7545-93e3-f02c38c2e8e8",
"raw": "{{host}}/myspace/user/018e2474-3c09-7606-a55c-f6d129815416",
"host": [
"{{host}}"
],
"path": [
"myspace",
"user",
"018e2453-0121-7545-93e3-f02c38c2e8e8"
"018e2474-3c09-7606-a55c-f6d129815416"
]
}
},
@ -62,6 +65,9 @@
{
"name": "Login",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
@ -97,7 +103,7 @@
"bearer": [
{
"key": "token",
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCJ1cG4iOiIwMThlMjQ1NC03YWY0LTcxNDAtODZiZC1mMjQ4YWE0NjEzZWMiLCJncm91cHMiOlsiVVNFUiJdLCJlbWFpbCI6Iml2YW5vdkBleGFtcGxlLmNvbSIsImlhdCI6MTcxMDAwNjU1MSwiZXhwIjoxNzEwMDA3NDUxLCJqdGkiOiIyMjViMDJlMi1kOTM1LTQ3MWMtOTQ0ZS0xNjIwZjU3MDJiNDkifQ.0hzr5O47ns0gxkgwz4DBZDA2dPdEivkq7_XVtf3OuRytwC6L-CV08vn0or3T3_9-84RxgOozFpW-PgVpcm7P2A5fabbqQz9_xfzDYrJ56fUEazF6wgE6IyqB5bBmj8bndVs1TVpV3Q0ZyAo99ix3piVj9WS2DnI4S0C7d-uZMQ2m4lLN63g9gOHaW5MY_Q_Dtsggj-Ab4MJe7X8UrXOJGaokVDtNj5DXJkqjpGG4ly4lGl4nLjPCE-RBeb3uAeZuRiXdtou20yEipwj_XS0fVaESJ9deMUZNGT_q-HGAQ2Om1VsasEVUL8KRBcpRN2WkU0E528q3hW9FD2DWwXh3Ww",
"value": "",
"type": "string"
}
]