@@ -22,7 +22,7 @@ const getDeepLink = (method, server, ...params) => {
2222
2323
2424const login = ( username , password ) => {
25- const response = http . post ( `${ data . server } /api/v1/login` , {
25+ const response = http . post ( `http://localhost:3000 /api/v1/login` , {
2626 headers : {
2727 'Content-Type' : 'application/json'
2828 } ,
@@ -44,7 +44,7 @@ const createUser = (customProps) => {
4444
4545 login ( output . account . adminUser , output . account . adminPassword ) ;
4646
47- http . post ( `${ data . server } /api/v1/users.create` , {
47+ http . post ( `http://localhost:3000 /api/v1/users.create` , {
4848 headers : {
4949 'Content-Type' : 'application/json' ,
5050 ...headers
@@ -74,15 +74,15 @@ const deleteCreatedUser = async ({ username: usernameToDelete }) => {
7474 try {
7575 login ( output . account . adminUser , output . account . adminPassword ) ;
7676
77- const result = http . get ( `${ data . server } /api/v1/users.info?username=${ usernameToDelete } ` , {
77+ const result = http . get ( `http://localhost:3000 /api/v1/users.info?username=${ usernameToDelete } ` , {
7878 headers : {
7979 'Content-Type' : 'application/json' ,
8080 ...headers
8181 }
8282 } ) ;
8383
8484 const userId = json ( result . body ) ?. data ?. user ?. _id ;
85- http . post ( `${ data . server } /api/v1/users.delete` , { userId, confirmRelinquish : true } , {
85+ http . post ( `http://localhost:3000 /api/v1/users.delete` , { userId, confirmRelinquish : true } , {
8686 headers : {
8787 'Content-Type' : 'application/json' ,
8888 ...headers
@@ -98,7 +98,7 @@ const createRandomTeam = (username, password) => {
9898
9999 const teamName = output . randomTeamName ( ) ;
100100
101- http . post ( `${ data . server } /api/v1/teams.create` , {
101+ http . post ( `http://localhost:3000 /api/v1/teams.create` , {
102102 headers : {
103103 'Content-Type' : 'application/json' ,
104104 ...headers
@@ -113,7 +113,7 @@ const createRandomRoom = (username, password, type = 'c') => {
113113 login ( username , password ) ;
114114 const room = `room${ output . random ( ) } ` ;
115115
116- const response = http . post ( `${ data . server } /api/v1/${ type === 'c' ? 'channels.create' : 'groups.create' } ` , {
116+ const response = http . post ( `http://localhost:3000 /api/v1/${ type === 'c' ? 'channels.create' : 'groups.create' } ` , {
117117 headers : {
118118 'Content-Type' : 'application/json' ,
119119 ...headers
@@ -133,7 +133,7 @@ const sendMessage = (username, password, channel, msg, tmid) => {
133133 login ( username , password ) ;
134134 const channelParam = tmid ? { roomId : channel } : { channel } ;
135135
136- const response = http . post ( `${ data . server } /api/v1/chat.postMessage` , {
136+ const response = http . post ( `http://localhost:3000 /api/v1/chat.postMessage` , {
137137 headers : {
138138 'Content-Type' : 'application/json' ,
139139 ...headers
@@ -153,7 +153,7 @@ const sendMessage = (username, password, channel, msg, tmid) => {
153153const getProfileInfo = ( userId ) => {
154154 login ( output . account . adminUser , output . account . adminPassword ) ;
155155
156- const result = http . get ( `${ data . server } /api/v1/users.info?userId=${ userId } ` , {
156+ const result = http . get ( `http://localhost:3000 /api/v1/users.info?userId=${ userId } ` , {
157157 headers : {
158158 'Content-Type' : 'application/json' ,
159159 ...headers
@@ -168,7 +168,7 @@ const getProfileInfo = (userId) => {
168168const post = ( endpoint , username , password , body ) => {
169169 login ( username , password ) ;
170170
171- const response = http . post ( `${ data . server } /api/v1/${ endpoint } ` , {
171+ const response = http . post ( `http://localhost:3000 /api/v1/${ endpoint } ` , {
172172 headers : {
173173 'Content-Type' : 'application/json' ,
174174 ...headers
@@ -182,7 +182,7 @@ const post = (endpoint, username, password, body) => {
182182const createDM = ( username , password , otherUsername ) => {
183183 login ( username , password ) ;
184184
185- const result = http . post ( `${ data . server } /api/v1/im.create` , {
185+ const result = http . post ( `http://localhost:3000 /api/v1/im.create` , {
186186 headers : {
187187 'Content-Type' : 'application/json' ,
188188 ...headers
0 commit comments