Skip to content

11 refactor user register#12

Open
fajar-dev wants to merge 4 commits intodevelopmentfrom
11-refactor-user-register
Open

11 refactor user register#12
fajar-dev wants to merge 4 commits intodevelopmentfrom
11-refactor-user-register

Conversation

@fajar-dev
Copy link
Copy Markdown
Member

No description provided.

@fajar-dev fajar-dev added the wontfix This will not be worked on label Oct 12, 2024
@fajar-dev fajar-dev requested a review from andrian2929 October 12, 2024 15:31
@fajar-dev fajar-dev self-assigned this Oct 12, 2024
Copy link
Copy Markdown

@andrian2929 andrian2929 left a comment

Choose a reason for hiding this comment

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

sebelum push run ini dulu jar

./vendor/bin/pint

https://laravel.com/docs/11.x/pint

*/
public function registrationCompleted(string $verifiedToken, string $userUuid, string $firstName, string $lastName, string $gender)
{
$data = $this->mainRepository->registrationCompleted($verifiedToken, $userUuid, $firstName, $lastName, $gender);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

userUuid nya gak mau dikasih validasi kah? karena di postgresql, kalau gak valid uuid nya akan throw query error

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

noted

public function registrationCompleted($verifiedToken, $userUuid, RegistrationCompletedRequest $request)
{
// dd([$verifiedToken, $userUuid]);
$data = $this->authService->registrationCompleted($verifiedToken, $userUuid, $request->validated('firstName'), $request->validated('lastName'), $request->validated('gender'));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

untuk token ini ada masa berlakunya nya gak jar?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

gaada, bagusnya gimana?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bagus kasih aja sih, ntah berapa lama jangan permanen, tapi gak urgent juga

'gender',
'email',
'password',
'photo_path',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

gak mau tambah email_verified_at, biar tau kapan akunnya pertama kali terverifikasi?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

noted

return [
'firstName' => ['required', 'string', 'max:255'],
'lastName' => ['required', 'string', 'max:255'],
'gender' => ['required', 'string', 'in:male,female'],
Copy link
Copy Markdown

@andrian2929 andrian2929 Oct 12, 2024

Choose a reason for hiding this comment

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

yang gender ini kan enum, bisa diganti jadi Rule::enum(GenderType::class)],

use App\Enum\GenderType;
use Illuminate\Validation\Rule;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

noted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants