Conversation
task_idから親タスクを辿ってルートタスクまでの階層を取得するエンドポイントを実装。 主な変更: - contract.ts: リクエスト/レスポンススキーマ定義 - service.ts: 親タスクを再帰的に辿るビジネスロジック(循環参照防止付き) - endpoint.trpc.ts: protectedProcedureによる認証必須のqueryエンドポイント - task.ts: selectエンドポイントをルーターに登録 レスポンス形式: TaskDTO[](rootタスクから指定タスクまで順に配列) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Issue #26に基づき、
task/selectエンドポイントを実装しました。このエンドポイントは、指定されたタスクIDから親タスクを辿ってルートタスクまでの階層をリストで返す機能を提供します。関連 issue
close: #26
やったこと
{ task_id: TaskId }TaskDTO[](rootタスクから順に配列)Result<T, AppError>パターンによるエラーハンドリングselectエンドポイントを登録やらないこと
影響範囲
src/server/api/routers/task.tsに新しいルーターを追加api.task.select.useQuery()として利用可能テスト
以下のコマンドで検証済み:
pnpm typecheck: 成功pnpm lint: 成功pnpm format: 成功API使用例:
備考
.unshift()を使用)