Skip to content

Commit

Permalink
Feature/user routes & pp (#37)
Browse files Browse the repository at this point in the history
* feat: bottom nav and header of profile page

* feat: display group on profile page

* feat: circle card buttons, with usable logout

* feat: bottom nav changes color based off of location

* refactor: top header its own component for profile

* feat: snipe caplans firebase info
  • Loading branch information
MattCMcCoy authored Feb 24, 2024
1 parent a02de69 commit 0fdb119
Show file tree
Hide file tree
Showing 36 changed files with 1,209 additions and 171 deletions.
1 change: 1 addition & 0 deletions backend/db/migrations/1.user.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ VALUES

-- Care-Wallet Team
('fIoFY26mJnYWH8sNdfuVoxpnVnr1', 'Matt', 'McCoy', '[email protected]', '', ''),
('JamnX6TZf0dt6juozMRzNG5LMQd2', 'Andy', 'Cap', '[email protected]', '', ''),
('BLq3MXk4rVg4RKuYiMd7aEmMhsz1', 'Ansh', 'Patel', '[email protected]', '', ''),
('mPeo3d3MiXfnpPJADWgFD9ZcB2M2', 'Olivia', 'Sedarski', '[email protected]', '', ''),
('onrQs8HVGBVMPNz4Fk1uE94bSxg1', 'Danny', 'Rollo', '[email protected]', '', ''),
Expand Down
1 change: 1 addition & 0 deletions backend/db/migrations/2.group.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ VALUES

-- Care-Wallet Team
(5, 'fIoFY26mJnYWH8sNdfuVoxpnVnr1', 'PRIMARY'),
(5, 'JamnX6TZf0dt6juozMRzNG5LMQd2', 'PRIMARY'),
(5, '5JgN2PQxCRM9VoCiiFPlQPNqkL32', 'PATIENT'),
(5, 'BLq3MXk4rVg4RKuYiMd7aEmMhsz1', 'SECONDARY'),
(5, 'mPeo3d3MiXfnpPJADWgFD9ZcB2M2', 'SECONDARY'),
Expand Down
201 changes: 201 additions & 0 deletions backend/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,155 @@ const docTemplate = `{
}
}
}
},
"/user": {
"get": {
"description": "gets the information about multiple users given their user id",
"tags": [
"user"
],
"summary": "gets the information about multiple users",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"description": "User IDs",
"name": "userIDs",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
}
}
}
},
"/user/{uid}": {
"get": {
"description": "gets the information about a user given their user id",
"tags": [
"user"
],
"summary": "gets the information about a user",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.User"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Updates a user with the provided userId given the updated user.",
"tags": [
"user"
],
"summary": "Updates a user",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "uid",
"in": "path",
"required": true
},
{
"description": "User Information",
"name": "UserInfo",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.UserInfoBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.User"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
}
}
},
"post": {
"description": "Creates a new user with the provided userId.",
"tags": [
"user"
],
"summary": "Creates a user",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "uid",
"in": "path",
"required": true
},
{
"description": "User Information",
"name": "UserInfo",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.UserInfoBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.User"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -1068,6 +1217,38 @@ const docTemplate = `{
}
}
},
"models.User": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"device_id": {
"type": "string"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"pfp_s3_url": {
"type": "string"
},
"phone": {
"type": "string"
},
"push_notification_enabled": {
"type": "boolean"
},
"user_id": {
"type": "string"
}
}
},
"task_labels.LabelData": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1145,6 +1326,26 @@ const docTemplate = `{
"type": "string"
}
}
},
"user.UserInfoBody": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "string"
}
}
}
}
}`
Expand Down
Loading

0 comments on commit 0fdb119

Please sign in to comment.