Skip to content
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

docs/openapi/v2.yamlにbotを弾くクエリパラメータの記述を追加 #1103

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/openapi/v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ paths:
get:
tags:
- user
parameters:
- name: bot
in: query
required: false
schema:
type: boolean
default: true
description: |
falseの場合botを除外します。
デフォルトではbotも含めます。
security:
- TrapMemberAuth: []
operationId: getUsers
Expand Down
2 changes: 1 addition & 1 deletion src/auth/traQ/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
return service.NewUserInfo(
values.NewTrapMemberID(response.ID),
values.NewTrapMemberName(response.Name),
status,

Check failure on line 93 in src/auth/traQ/user.go

View workflow job for this annotation

GitHub Actions / Build

not enough arguments in call to service.NewUserInfo

Check failure on line 93 in src/auth/traQ/user.go

View workflow job for this annotation

GitHub Actions / Test

not enough arguments in call to service.NewUserInfo
), nil
}

Expand All @@ -98,6 +98,7 @@
ID uuid.UUID `json:"id"`
Name string `json:"name"`
State int `json:"state"`
Bot bool `json:"bot"`
}

// GetAllActiveUsers
Expand Down Expand Up @@ -147,11 +148,10 @@
default:
return nil, fmt.Errorf("unexpected state: %d", user.State)
}

users = append(users, service.NewUserInfo(
values.NewTrapMemberID(user.ID),
values.NewTrapMemberName(user.Name),
status,

Check failure on line 154 in src/auth/traQ/user.go

View workflow job for this annotation

GitHub Actions / Build

not enough arguments in call to service.NewUserInfo

Check failure on line 154 in src/auth/traQ/user.go

View workflow job for this annotation

GitHub Actions / Test

not enough arguments in call to service.NewUserInfo
))
}

Expand Down Expand Up @@ -207,7 +207,7 @@
users = append(users, service.NewUserInfo(
values.NewTrapMemberID(user.ID),
values.NewTrapMemberName(user.Name),
status,

Check failure on line 210 in src/auth/traQ/user.go

View workflow job for this annotation

GitHub Actions / Build

not enough arguments in call to service.NewUserInfo

Check failure on line 210 in src/auth/traQ/user.go

View workflow job for this annotation

GitHub Actions / Test

not enough arguments in call to service.NewUserInfo
))
}

Expand Down
Loading
Loading