Skip to content

Commit

Permalink
fix: forgotPassword payload and input border color
Browse files Browse the repository at this point in the history
  • Loading branch information
atrincas committed Jan 7, 2025
1 parent cc5adb3 commit b4cad7a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions client/src/components/forms/input/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export const THEME = {
light: {
base: 'w-full leading-tight text-grey-0 bg-white focus:border-grey-40',
status: {
none: 'border-grey-0',
none: 'border-grey-40',
valid: 'border-green-0',
error: 'border-red-500',
disabled: 'border-grey-0 opacity-50',
disabled: 'border-grey-40 opacity-50',
},
icon: 'text-grey-0 text-opacity-50',
mode: {
Expand Down
1 change: 1 addition & 0 deletions client/src/components/search/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const Search: React.FC<SearchProps> = ({
className={cx({
'w-full h-full py-3 px-4': true,
[THEME[theme]]: true,
'!border-grey-0': true,
})}
onChange={handleChange}
/>
Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/wrapper/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface WrapperProps {

export const AuthWrapper = ({ children }: WrapperProps) => {
return (
<div className="justify-center items-center flex grow">
<div className="justify-center items-center flex grow px-5">
<div className="bg-white px-40 py-20">{children}</div>
</div>
);
Expand Down
10 changes: 2 additions & 8 deletions client/src/services/authentication/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,15 @@ class AuthenticationService {

async signIn(email: string, password: string) {
try {
const response = await this.api.request({
url: '/member/sign_in',
method: 'POST',
data: { email, password },
});
return response;
return await this.api.post('/member/sign_in', { email, password });
} catch (err) {
this.handleApiError(err, 'Failed to sign in');
}
}

async forgotPassword(email: string) {
try {
const response = await this.api.post('/reset_password', { data: { email } });
return response;
return await this.api.post('/reset_password', { email });
} catch (err) {
this.handleApiError(err, 'Failed to process password reset');
}
Expand Down

0 comments on commit b4cad7a

Please sign in to comment.