Skip to content

Commit 1cb25a3

Browse files
committed
added forked boolean to state for clone check
1 parent 3303a6a commit 1cb25a3

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

app/src/interfaces/Interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { DragObjectWithType } from 'react-dnd';
22

33
export interface State {
44
name: string;
5+
forked: boolean;
56
isLoggedIn: boolean;
67
components: Component[];
78
rootComponents: number[];

app/src/redux/reducers/slice/appStateSlice.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import manageSeparators from '../../../helperFunctions/manageSeparators';
1313

1414
export const initialState: State = {
1515
name: '',
16+
forked: false,
1617
isLoggedIn: false,
1718
// config: { saveFlag: true, saveTimer: false },
1819
components: [

server/controllers/marketplaceController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ const marketplaceController: MarketplaceController = {
115115
const { updatedProject } = req.body;
116116
updatedProject.userId = userId;
117117
updatedProject.username = username;
118+
updatedProject.project.forked = true; // updated the forked tag
118119
delete updatedProject._id; // removes the old project id from the object
119120
updatedProject.createdAt = Date.now();
120121

0 commit comments

Comments
 (0)