Skip to content

Commit 4047937

Browse files
committed
fix: replace RepoView with Repo and remove unused proxyUrl field
1 parent 8888087 commit 4047937

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/ui/services/repo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const getRepo = async (id: string): Promise<ServiceResult<RepoView>> => {
7676
}
7777
};
7878

79-
const addRepo = async (repo: RepoView): Promise<ServiceResult<RepoView>> => {
79+
const addRepo = async (repo: Repo): Promise<ServiceResult<RepoView>> => {
8080
const apiV1Base = await getApiV1BaseUrl();
8181
const url = new URL(`${apiV1Base}/repo`);
8282

src/ui/views/RepoList/Components/NewRepo.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ import { addRepo } from '../../../services/repo';
3131
import { makeStyles } from '@material-ui/core/styles';
3232
import styles from '../../../assets/jss/material-dashboard-react/views/dashboardStyle';
3333
import { RepoIcon } from '@primer/octicons-react';
34-
import { RepoView } from '../../../types';
34+
import { Repo } from '../../../../db/types';
3535

3636
interface AddRepositoryDialogProps {
3737
open: boolean;
3838
onClose: () => void;
39-
onSuccess: (repo: RepoView) => void;
39+
onSuccess: (repo: Repo) => void;
4040
}
4141

4242
interface NewRepoProps {
43-
onSuccess: (repo: RepoView) => Promise<void>;
43+
onSuccess: (repo: Repo) => Promise<void>;
4444
}
4545

4646
const useStyles = makeStyles(styles as any);
@@ -59,7 +59,7 @@ const AddRepositoryDialog: React.FC<AddRepositoryDialogProps> = ({ open, onClose
5959
onClose();
6060
};
6161

62-
const handleSuccess = (repo: RepoView) => {
62+
const handleSuccess = (repo: Repo) => {
6363
onSuccess(repo);
6464
setTip(true);
6565
};
@@ -71,11 +71,10 @@ const AddRepositoryDialog: React.FC<AddRepositoryDialogProps> = ({ open, onClose
7171
};
7272

7373
const add = async () => {
74-
const repo: RepoView = {
74+
const repo: Repo = {
7575
project: project.trim(),
7676
name: name.trim(),
7777
url: url.trim(),
78-
proxyURL: '',
7978
users: { canPush: [], canAuthorise: [] },
8079
};
8180

0 commit comments

Comments
 (0)