Skip to content

Commit

Permalink
#113: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
eggwhat committed Jan 14, 2024
1 parent ee899e6 commit 90b5494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SwiftParcel.Web/frontend/src/components/modals/loginModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
} from "flowbite-react";
import React from "react";
import { Link } from "react-router-dom";
import { slogin } from "../../utils/api";
import { login } from "../../utils/api";
import { saveUserInfo } from "../../utils/storage";
import { HiInformationCircle } from "react-icons/hi";

Expand Down Expand Up @@ -36,7 +36,7 @@ export function LoginModal(props: LoginModalProps) {
setError("");
setIsLoading(true);

slogin(email, password)
login(email, password)
.then(async (res) => {
console.log(res)

Expand Down
2 changes: 1 addition & 1 deletion SwiftParcel.Web/frontend/src/utils/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const getAuthHeader = () => {

const defaultPageLimit = 10;

export const slogin = async (email: string, password: string) => {
export const login = async (email: string, password: string) => {
try {
const response = await api.post('/identity/sign-in', { email, password });
const { accessToken, refreshToken, role, expires } = response.data;
Expand Down

0 comments on commit 90b5494

Please sign in to comment.