Skip to content

Commit

Permalink
[#66] Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
dewy-i committed Aug 9, 2021
1 parent 2fdcf47 commit e966ad9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const DELETE = url => ({ method: 'DELETE', url });

// API CONFIG LIST
export const API_LOGIN = makeConfig(POST('/user/login'));
export const API_GET_SEMESTER = makeConfig(GET, '/semester');
export const API_GET_SEMESTER = makeConfig(GET('/semester'));
export const API_GET_SEMESTERS = makeConfig(GET('/semesters'));
export const API_GET_ALL_NOTICES = makeConfig(GET('/notice/all'));
export const API_CREATE_NOTICE = makeConfig(POST('/notice'));
Expand Down
5 changes: 1 addition & 4 deletions src/views/login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export function LoginBox() {

setLoading(true);
const response = await requestAPI(API_LOGIN({ uid, pw }));
setLoading(false);

if (response.status !== StatusCodes.OK) {
switch (response.status) {
Expand Down Expand Up @@ -153,9 +152,7 @@ export function LoginBox() {
onKeyPress={onEnterPress}
value={pw}
/>
{warning.length > 0 ? (
<Typography className={classes.warning}>{warning}</Typography>
) : null}
{warning && <Typography className={classes.warning}>{warning}</Typography>}
</Container>
<Button
className={buttonClass.linearRed}
Expand Down

0 comments on commit e966ad9

Please sign in to comment.