Add logging to team account creation and update

The commit enhances the team account creation and update features by adding logging capabilities. It renames createOrganizationAccountAction to createTeamAccountAction for better contextual relevance. The logging provides informative insights into the process of creating and updating the name of the team account, aiding in easier debugging in the event of an error.
This commit is contained in:
giancarlo
2024-05-03 09:09:47 +07:00
parent 468204d355
commit 549097efa6
3 changed files with 32 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ import { Input } from '@kit/ui/input';
import { Trans } from '@kit/ui/trans';
import { CreateTeamSchema } from '../schema/create-team.schema';
import { createOrganizationAccountAction } from '../server/actions/create-team-account-server-actions';
import { createTeamAccountAction } from '../server/actions/create-team-account-server-actions';
export function CreateTeamAccountDialog(
props: React.PropsWithChildren<{
@@ -75,7 +75,7 @@ function CreateOrganizationAccountForm(props: { onClose: () => void }) {
onSubmit={form.handleSubmit((data) => {
startTransition(async () => {
try {
await createOrganizationAccountAction(data);
await createTeamAccountAction(data);
} catch (error) {
setError(true);
}