-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Charvi Zala
authored and
Charvi Zala
committed
May 27, 2024
1 parent
faeff9c
commit ce8f5d1
Showing
3 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TABLE user_details( | ||
id BIGINT PRIMARY KEY NOT NULL AUTO_INCREMENT, | ||
name VARCHAR(250), | ||
image VARCHAR(1000), | ||
bio LONGTEXT, | ||
phone_number VARCHAR(10), | ||
email VARCHAR(50), | ||
password TEXT, | ||
profile_type VARCHAR(45), | ||
role VARCHAR(45), | ||
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
google_id VARCHAR(1000) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
## Profile Management API | ||
|
||
### Registration | ||
|
||
- **Route**: POST /register/createUser | ||
- **Access**: Public | ||
|
||
Register a new user account. | ||
|
||
#### Request Body | ||
|
||
```json | ||
{ | ||
"name": "string (1-250 characters)", | ||
"email": "string (must be there)", | ||
"password": "string (must be there)", | ||
"phoneNumber":"string with 10 length", | ||
"profileType":"string (must be public or private)", | ||
"role":"string (must be normal or admin)" | ||
} | ||
``` | ||
|
||
#### Response | ||
|
||
- Status Code: 200 OK | ||
- Content: JSON object with success message | ||
|
||
### Login | ||
|
||
- **Route**: POST /login/user | ||
- **Access**: Public | ||
|
||
Authenticate a user and return user data. | ||
|
||
#### Request Body | ||
|
||
```json | ||
{ | ||
"name": "string (1-250 characters)", | ||
"password": "string (not null)" | ||
} | ||
``` | ||
|
||
#### Response | ||
|
||
- Status Code: 200 OK | ||
- Content: JSON object with success message and user data | ||
|
||
### Checkout Profile | ||
|
||
- **Route**: POST checkout/profile | ||
- **Access**: Public | ||
|
||
#### Request Params | ||
- we have to pass Id | ||
|
||
|
||
#### Response | ||
|
||
- Status Code: 200 OK | ||
- Content: JSON object with all the user data. | ||
|
||
### Update Profile | ||
|
||
- **Route**: POST /update/profile | ||
- **Access**: Public | ||
|
||
|
||
#### Request Body | ||
|
||
```json | ||
{ | ||
"id": "integer", | ||
"imageUrl": "string ", | ||
"bio":"string " | ||
} | ||
``` | ||
|
||
#### Response | ||
|
||
- Status Code: 200 OK | ||
- Content: JSON object with success message | ||
|
||
|
||
### Update Image | ||
- **Route**:/update/image | ||
- **Access**: Public | ||
|
||
|
||
#### Request Body | ||
|
||
```json | ||
{ | ||
"id": "integer", | ||
"imageUrl": "string ", | ||
|
||
} | ||
``` | ||
|
||
#### Response | ||
|
||
- Status Code: 200 OK | ||
- Content: JSON object with success message | ||
|
||
### Update ProfileType | ||
- **Route**:/update/profileType | ||
- **Access**: Public | ||
|
||
|
||
#### Request Body | ||
|
||
```json | ||
{ | ||
"id": "integer", | ||
"profileType": "either normal or admin user", | ||
|
||
} | ||
``` | ||
|
||
#### Response | ||
|
||
- Status Code: 200 OK | ||
- Content: JSON object with success message | ||
|
||
### Checkout UserProfileList | ||
- **Route**:/checkout/userProfilesList | ||
- **Access**: Public | ||
|
||
|
||
#### Request Params | ||
- we have to pass Id | ||
|
||
#### Response | ||
|
||
- Status Code: 200 OK | ||
- Content: JSON object with other user data | ||
|
||
|
||
|
||
|