Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

PATCH /profiles/current lets a participant set their participantType

オープン 初心者向け
#970 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
authorization

調査の方向性

PATCH /profiles/currentで使用されるリクエスト型と、UpdateProfileRequestの定義を見つけてください。まずルートをリクエストのバリデーションまでたどり、管理者用ルートPATCH /profiles/{profileId}と比較してください。参加者用ルートにはparticipantTypeを除外するリクエスト型を指定してください。参加者の更新ではこのフィールドを変更できず、管理者の更新では引き続き変更できる状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

backend bug

PATCH /profiles/current writes the request body straight into the participant's profile, and UpdateProfileRequest includes participantType. So a participant can make themselves STANDARD, GUARDIAN, DEPENDENT_AGE or DEPENDENT_OTHER. The profile edit page doesn't send this field, so it takes a hand-made request.

participantType decides whose survey answers set a dependent's consent: a guardian's answers are copied to the family's dependents, combined across co-guardians. The admin route, PATCH /profiles/{profileId}, guards this. It refuses to leave a dependent with no guardian or to add a dependent to a family with no guardian, and it recalculates the dependents' answers afterwards. The participant route does none of that. A guardian can step out of their family's consent, or a participant can mark themselves a dependent in a family with no guardian, and the dependents' answers aren't recalculated either way.

Fix: give PATCH /profiles/current its own request type without participantType, and leave type changes to the admin route.

Related: #580, #585.

主要言語
TypeScript
スター
4
フォーク
0
平均マージ
14時間 50分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Garvan-Data-Science-Platform/ctrl のほかの issue

Garvan-Data-Science-Platform/ctrl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。