Skip to content

Commit

Permalink
readme file added
Browse files Browse the repository at this point in the history
  • Loading branch information
Charvi Zala authored and Charvi Zala committed May 27, 2024
1 parent faeff9c commit ce8f5d1
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 0 deletions.
2 changes: 2 additions & 0 deletions New_APIs/Profile_Management_API/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
package-lock.json
13 changes: 13 additions & 0 deletions New_APIs/Profile_Management_API/database.txt
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)
);
140 changes: 140 additions & 0 deletions New_APIs/Profile_Management_API/readme.md
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




0 comments on commit ce8f5d1

Please sign in to comment.