fix(devstar home): now only response code is 0 that means successfully delete dev container
This commit is contained in:
		@@ -801,10 +801,16 @@ header("Allow: GET, POST, OPTIONS, PUT, DELETE");
 | 
			
		||||
                return response.json();
 | 
			
		||||
            })
 | 
			
		||||
            .then(data => {
 | 
			
		||||
                console.log('Successfully delete dev container belong to repoId:', repoId, data)
 | 
			
		||||
                const respCode = data.code;
 | 
			
		||||
                if (0 == respCode) {
 | 
			
		||||
                    console.log('Successfully delete dev container belong to repoId:', repoId, data)
 | 
			
		||||
                } else {
 | 
			
		||||
                    const errorMsg = data.data.ErrorMsg
 | 
			
		||||
                    throw new Error(errorMsg)
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
            .catch(error => {
 | 
			
		||||
                console.error(`Failed to delete dev container belong to repoId: ${repoId}`)
 | 
			
		||||
                console.error(`Failed to delete dev container belong to repoId: ${repoId}\n`, error)
 | 
			
		||||
            })
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user