Skip to content

Commit 4e277f1

Browse files
authored
Make "API Key" label consistent in errors and API responses (#88)
1 parent e55f231 commit 4e277f1

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/features/dashboard/keys/create-api-key-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const CreateApiKeyDialog: FC<CreateApiKeyDialogProps> = ({
148148
<Alert variant="warning" className="mt-4">
149149
<AlertTitle>Important</AlertTitle>
150150
<AlertDescription>
151-
Make sure to copy your API key now.
151+
Make sure to copy your API Key now.
152152
<br /> You won't be able to see it again!
153153
</AlertDescription>
154154
</Alert>

src/features/dashboard/keys/table-row.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ export default function ApiKeyTableRow({
4343
deleteApiKeyAction,
4444
{
4545
onSuccess: () => {
46-
toast(defaultSuccessToast('Api key has been deleted.'))
46+
toast(defaultSuccessToast('API Key has been deleted.'))
4747
setIsDeleteDialogOpen(false)
4848
},
4949
onError: (error) => {
5050
toast(
5151
defaultErrorToast(
52-
error.error.serverError || 'Failed to delete api key.'
52+
error.error.serverError || 'Failed to delete API Key.'
5353
)
5454
)
5555
setIsDeleteDialogOpen(false)
@@ -76,7 +76,7 @@ export default function ApiKeyTableRow({
7676
open={isDeleteDialogOpen}
7777
onOpenChange={setIsDeleteDialogOpen}
7878
title="Delete API Key"
79-
description="Are you sure you want to delete this API key? This action cannot be undone."
79+
description="Are you sure you want to delete this API Key? This action cannot be undone."
8080
confirm="Delete"
8181
onConfirm={deleteKey}
8282
confirmProps={{

src/server/keys/key-actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const createApiKeyAction = authActionClient
4141
if (res.error) {
4242
logError(ERROR_CODES.INFRA, '/api-keys', res.error)
4343

44-
return returnServerError('Failed to create api key')
44+
return returnServerError('Failed to create API Key')
4545
}
4646

4747
revalidatePath(`/dashboard/[teamIdOrSlug]/keys`, 'page')
@@ -81,7 +81,7 @@ export const deleteApiKeyAction = authActionClient
8181
if (res.error) {
8282
logError(ERROR_CODES.INFRA, '/api-keys/{apiKeyID}', res.error)
8383

84-
return returnServerError('Failed to delete api key')
84+
return returnServerError('Failed to delete API Key')
8585
}
8686

8787
revalidatePath(`/dashboard/[teamIdOrSlug]/keys`, 'page')

0 commit comments

Comments
 (0)