Skip to content

Commit

Permalink
trying to fix cors
Browse files Browse the repository at this point in the history
  • Loading branch information
scffs committed Sep 13, 2023
1 parent c59f033 commit e43b3b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/UI/Mark/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CSSProperties, FC } from 'react';
import { Footnote } from '@vkontakte/vkui';
import { EAbsenceTypes } from 'diary-shared';
import { TMark } from '../../../../../shared';
import {TMark} from "../../../types";

type Sizes = 'l' | 's';

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/setDefaultMark.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Task } from 'diary-shared';
import { TextMark } from '../../../shared';
import {TextMark} from "../types";
// TODO: можно с помощью неё фиксить ошибки с неправильными оценами
const setDefaultMark = (task: Task): TextMark => {
if (task.isRequired && !task.mark) {
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/views/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,12 @@ const LoginForm: FC<{ id: string }> = ({ id }) => {

setIsLoading(true);
setPopout(<ScreenSpinner state='loading' />);
const response = await fetch(`${import.meta.env.VITE_SERVER_URL}/login`, {
const response = await fetch(`${import.meta.env.VITE_SERVER_URL}/hello`, {
method: 'POST',
body: JSON.stringify({
login,
password: passwordHashed,
}),
headers: {
"Access-Control-Allow-Origin": "*"
}
});
if (response.status === 401) {
console.log('401');
Expand Down

0 comments on commit e43b3b2

Please sign in to comment.