From 2e4f95ba313357f67d67eff0d91f89761105c763 Mon Sep 17 00:00:00 2001 From: mmvpm Date: Thu, 18 Apr 2024 19:18:10 +0300 Subject: [PATCH] fix typos --- README.md | 7 ++++--- service/src/main/resources/db.migration/V1__init.sql | 4 ++-- .../scala/com/github/mmvpm/service/api/OfferHandler.scala | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 22a3269..413607d 100644 --- a/README.md +++ b/README.md @@ -46,14 +46,15 @@ create table users create table user_offers ( - offer_id uuid primary key, - user_id uuid not null references users(id) + offer_id uuid primary key references offers (id), + user_id uuid not null references users (id) ); ``` ### Authorization -Each user has login (telegram @login) and password, and, in order to use the service, he should get a session and then attach it to each request +Each user has login (telegram @login) and password, and, in order to use the service, he should get a session and then +attach it to each request Creating a session: diff --git a/service/src/main/resources/db.migration/V1__init.sql b/service/src/main/resources/db.migration/V1__init.sql index 1593bf5..f4d32a0 100644 --- a/service/src/main/resources/db.migration/V1__init.sql +++ b/service/src/main/resources/db.migration/V1__init.sql @@ -19,6 +19,6 @@ create table users create table user_offers ( - offer_id uuid primary key, - user_id uuid not null references users(id) + offer_id uuid primary key references offers (id), + user_id uuid not null references users (id) ); diff --git a/service/src/main/scala/com/github/mmvpm/service/api/OfferHandler.scala b/service/src/main/scala/com/github/mmvpm/service/api/OfferHandler.scala index 309e31b..10a50be 100644 --- a/service/src/main/scala/com/github/mmvpm/service/api/OfferHandler.scala +++ b/service/src/main/scala/com/github/mmvpm/service/api/OfferHandler.scala @@ -27,7 +27,7 @@ class OfferHandler[F[_]: Applicative](offerService: OfferService[F], override va private val getOffersByIds: ServerEndpoint[Any, F] = endpoint.withApiErrors.post - .summary("Get all offers of the specified user") + .summary("Get all offers by ids") .in("api" / "v1" / "offer" / "list") .in(jsonBody[GetOffersRequest]) .out(jsonBody[OffersResponse])