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

numbersにuniqueを付与 #330

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

hikahana
Copy link
Collaborator

対応Issue

  • resolve #0

概要

adminのみの変更です。
numbers schemaのnumberにunique制約を付与しました。
フロント側でエラーハンドリングを追加
import周りのeslintを追加

実装詳細

submitの際にonErrorでunique制約エラーの際、アラートで入力済みと返すように修正。
それ以外のエラーはエラーが発生しましたとだけ返しています。

画面スクリーンショット等

image

テスト項目

  • 同じ数値を入力しようとしてアラートが返ってくるか返ってくるか。
  • その際、サーバーサイドエラーでアプリが落ちないか。
  • コードレビューお願いします。

備考

@hikahana hikahana marked this pull request as ready for review December 30, 2024 20:40
@github-actions github-actions bot added frontend backend bug Something isn't working labels Dec 30, 2024
@TkymHrt TkymHrt requested a review from Copilot January 15, 2025 12:18

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • .vscode/settings.json: Language not supported
  • api/migrations/default/1720521696814_auto/up.sql: Language not supported
  • view-admin/.eslintrc.json: Language not supported
  • view-admin/package.json: Language not supported
Comments suppressed due to low confidence (2)

view-admin/src/pages/index.tsx:106

  • [nitpick] The error message should be more specific and user-friendly. Consider changing it to 'The number ${submitNumber} has already been entered.'
alert(`${submitNumber} は既に入力済みです。`);

view-admin/src/pages/index.tsx:108

  • [nitpick] The error message 'エラーが発生しました。' is too generic. Consider providing more context or guidance for the user.
alert("エラーが発生しました。");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant