-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ルーム入室エンドポイント実装 #29
ルーム入室エンドポイント実装 #29
Conversation
QAエビデンスDBにも適切に値を書き込むことができている {
"user_id": {
"S": "01bc0364-86e4-43f6-9eb5-7ca03e2f990f"
},
"answers": {
"L": [
{
"M": {
"answer": {
"BOOL": true
},
"question_id": {
"S": "1"
}
}
},
{
"M": {
"answer": {
"BOOL": true
},
"question_id": {
"S": "2"
}
}
},
{
"M": {
"answer": {
"BOOL": false
},
"question_id": {
"S": "3"
}
}
},
{
"M": {
"answer": {
"BOOL": false
},
"question_id": {
"S": "4"
}
}
},
{
"M": {
"answer": {
"BOOL": true
},
"question_id": {
"S": "5"
}
}
}
]
},
"nickname": {
"S": "gorugo"
},
"room_name": {
"S": "youngeek"
}
} |
lambda/room/{room_id}/POST/main.go
Outdated
svc := dynamodb.NewFromConfig(cfg) | ||
|
||
tableName := "CandleBackendUserTable" | ||
if t, exists := os.LookupEnv("USER_ABLE_NAME"); exists { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
"user_id": &types.AttributeValueMemberS{Value: userData.UserId}, | ||
"nickname": &types.AttributeValueMemberS{Value: userData.NickName}, | ||
"room_name": &types.AttributeValueMemberS{Value: userData.RoomName}, | ||
"answers": &types.AttributeValueMemberL{Value: answers}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
全体で用語の統一したい。room_idかな
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lambda/room/{room_id}/POST/main.go
Outdated
type Response struct { | ||
Body string `json:"body"` | ||
type Answer struct { | ||
QuestionId string `json:"question_id" dynamodbav:"question_id"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule also applies to “ID” when it is short for “identifier” (which is pretty much all cases when it’s not the “id” as in “ego”, “superego”), so write “appID” instead of “appId”.
https://go.dev/wiki/CodeReviewComments
QuestionId
より QuestionID
の方がよさそう
close #18