File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
packages/hoppscotch-backend/src/team-environments Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,11 @@ export class TeamEnvironmentsService {
3333 * @returns TeamEnvironment model
3434 */
3535 private cast ( teamEnvironment : DBTeamEnvironment ) : TeamEnvironment {
36+ const { id, name, teamID } = teamEnvironment ;
3637 return {
37- id : teamEnvironment . id ,
38- name : teamEnvironment . name ,
39- teamID : teamEnvironment . teamID ,
38+ id,
39+ name,
40+ teamID,
4041 variables : JSON . stringify ( teamEnvironment . variables ) ,
4142 } ;
4243 }
@@ -73,8 +74,8 @@ export class TeamEnvironmentsService {
7374
7475 const result = await this . prisma . teamEnvironment . create ( {
7576 data : {
76- name : name ,
77- teamID : teamID ,
77+ name,
78+ teamID,
7879 variables : JSON . parse ( variables ) ,
7980 } ,
8081 } ) ;
@@ -99,7 +100,7 @@ export class TeamEnvironmentsService {
99100 try {
100101 const result = await this . prisma . teamEnvironment . delete ( {
101102 where : {
102- id : id ,
103+ id,
103104 } ,
104105 } ) ;
105106
@@ -130,7 +131,7 @@ export class TeamEnvironmentsService {
130131 if ( ! isTitleValid ) return E . left ( TEAM_ENVIRONMENT_SHORT_NAME ) ;
131132
132133 const result = await this . prisma . teamEnvironment . update ( {
133- where : { id : id } ,
134+ where : { id } ,
134135 data : {
135136 name,
136137 variables : JSON . parse ( variables ) ,
You can’t perform that action at this time.
0 commit comments