File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { Endpoints } from "../features/constants" ;
2+
3+ export const nameGenerator = ( endpoint : Endpoints | "" ) => {
4+ let name = "Terraform" ;
5+ switch ( endpoint ) {
6+ case Endpoints . POST_IAC_T_DOCKER :
7+ name = `${ name } _Docker` ;
8+ break ;
9+ case Endpoints . POST_IAC_T_EC2 :
10+ name = `${ name } _EC2` ;
11+ break ;
12+ case Endpoints . POST_IAC_T_S3 :
13+ name = `${ name } _S3` ;
14+ break ;
15+ case Endpoints . POST_IAC_T_IAM :
16+ name = `${ name } _IAM` ;
17+ break ;
18+ }
19+ return name ;
20+ } ;
Original file line number Diff line number Diff line change 11import { create } from "zustand" ;
2- import { UserType } from "../features/constants" ;
2+ import { Endpoints , UserType } from "../features/constants" ;
33import { Message } from "../features/model" ;
44
55interface GeneratorQuery {
66 isSuccess : boolean ;
7- endpoint : string ;
7+ endpoint : Endpoints | "" ;
88}
99
1010interface DevOpsStore {
@@ -17,7 +17,7 @@ interface DevOpsStore {
1717 resetMessages : ( ) => void ;
1818
1919 generatorQuery : GeneratorQuery ;
20- setGeneratorQuery : ( isSuccess : boolean , endpoint : string ) => void ;
20+ setGeneratorQuery : ( isSuccess : boolean , endpoint : Endpoints | "" ) => void ;
2121}
2222
2323const initialState : Pick <
You can’t perform that action at this time.
0 commit comments