Skip to content

Commit febec0a

Browse files
Merge pull request #7 from F3-Organization/dev
Dev
2 parents 6435b76 + 37378e5 commit febec0a

File tree

82 files changed

+1050
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1050
-112
lines changed

docker-compose-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ services:
1515
restart: always
1616
depends_on:
1717
- database
18-
18+
- rabbitmq
1919
rabbitmq:
20-
image: rabbitmq:latest
20+
image: rabbitmq:4.1.1-management-alpine
2121
container_name: contentflow-rabbitmq
2222
ports:
2323
- "5672:5672"

docs/database/DDL.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ CREATE TABLE content_flow.authentications (
2323
CONSTRAINT unique_user_provider UNIQUE (user_id, provider)
2424
);
2525

26+
CREATE TABLE content_flow.password_recovery_tokens (
27+
id UUID PRIMARY KEY,
28+
user_id UUID REFERENCES content_flow.users(id) ON DELETE CASCADE,
29+
token INTEGER NOT NULL UNIQUE,
30+
expires_at TIMESTAMP NOT NULL,
31+
used BOOLEAN DEFAULT FALSE,
32+
created_at TIMESTAMP DEFAULT NOW()
33+
);
34+
2635
CREATE TABLE content_flow.content (
2736
id UUID PRIMARY KEY,
2837
user_id UUID NOT NULL REFERENCES content_flow.users(id) ON DELETE CASCADE,
File renamed without changes.

docs/swagger/authentication/refresh-access-token.yaml renamed to docs/swagger/authentication/local/refresh-access-token.yaml

File renamed without changes.
File renamed without changes.

docs/swagger/authentication/create-google-auth-url.yaml renamed to docs/swagger/authentication/oauth-google/create-google-auth-url.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
post:
22
tags:
3-
- Auth
3+
- Google OAuth
44
summary: Create a google url authentication
55
responses:
66
"200":

docs/swagger/authentication/login-oauth-google.yaml renamed to docs/swagger/authentication/oauth-google/login-oauth-google.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
get:
22
tags:
3-
- Auth
3+
- Google OAuth
44
summary: OAuth Google login endpoint
55
requestBody:
66
required: true
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
post:
2+
tags:
3+
- Recovery Password
4+
summary: Initiates the password recovery process
5+
requestBody:
6+
required: true
7+
content:
8+
application/json:
9+
schema:
10+
type: object
11+
properties:
12+
email:
13+
type: string
14+
format: email
15+
description: The email address of the user requesting password recovery
16+
17+
description: This endpoint allows users to initiate the password recovery process by providing their email address.
18+
responses:
19+
"200":
20+
description: Password recovery email sent successfully
21+
content:
22+
application/json:
23+
schema:
24+
type: object
25+
properties:
26+
success:
27+
type: boolean
28+
example: true
29+
message:
30+
type: string
31+
example: "Password recovery email sent successfully"
32+
"404":
33+
description: "User not found"
34+
content:
35+
application/json:
36+
schema:
37+
type: object
38+
properties:
39+
success:
40+
type: boolean
41+
example: false
42+
message:
43+
type: string
44+
example: "User not found"
45+
"500":
46+
description: "Internal server error"
47+
content:
48+
application/json:
49+
schema:
50+
type: object
51+
properties:
52+
success:
53+
type: boolean
54+
example: false
55+
message:
56+
type: string
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
patch:
2+
tags:
3+
- Recovery Password
4+
description: Recovery Password endpoint
5+
requestBody:
6+
required: true
7+
content:
8+
application/json:
9+
schema:
10+
type: object
11+
properties:
12+
token:
13+
type: number
14+
description: The recovery token for password reset
15+
password:
16+
type: string
17+
description: The new password for the user
18+
responses:
19+
"204":
20+
description: "Success - No content"
21+
"401":
22+
description: "The password cannot be the same as the old one"
23+
content:
24+
application/json:
25+
schema:
26+
type: object
27+
properties:
28+
success:
29+
type: boolean
30+
example: false
31+
message:
32+
type: string
33+
example: "The password cannot be the same as the old one"
34+
"400":
35+
description: "Invalid request"
36+
content:
37+
application/json:
38+
schema:
39+
type:
40+
properties:
41+
success:
42+
type: boolean
43+
default: false
44+
message:
45+
type: string
46+
"404":
47+
description: "Token not found"
48+
content:
49+
application/json:
50+
schema:
51+
type: object
52+
properties:
53+
success:
54+
type: boolean
55+
example: false
56+
message:
57+
type: string
58+
example: "Token not found"

src/application/dao/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export * from "./user-dao.interface";
22
export * from "./auth-dao.interface";
33
export * from "./plan-dao.interface";
44
export * from "./subscription-dao.interface";
5+
export * from "./recovery-password-dao.interface";
56
export * from "./subscription-stripe-data-dao.interface";

0 commit comments

Comments
 (0)