+6
-7
appview/state/state.go
+6
-7
appview/state/state.go
···
226
226
return
227
227
}
228
228
229
-
w.Write([]byte("check success"))
230
-
231
229
// mark as registered
232
230
err = s.db.Register(domain)
233
231
if err != nil {
234
232
log.Println("failed to register domain", err)
235
233
http.Error(w, err.Error(), http.StatusInternalServerError)
234
+
return
236
235
}
237
236
238
237
// set permissions for this did as owner
···
240
239
if err != nil {
241
240
log.Println("failed to register domain", err)
242
241
http.Error(w, err.Error(), http.StatusInternalServerError)
243
-
}
244
-
245
-
if err != nil {
246
-
log.Println("failed to setup owner of domain", err)
247
-
http.Error(w, err.Error(), http.StatusInternalServerError)
242
+
return
248
243
}
249
244
250
245
// add basic acls for this domain
···
252
247
if err != nil {
253
248
log.Println("failed to setup owner of domain", err)
254
249
http.Error(w, err.Error(), http.StatusInternalServerError)
250
+
return
255
251
}
256
252
257
253
// add this did as owner of this domain
···
259
255
if err != nil {
260
256
log.Println("failed to setup owner of domain", err)
261
257
http.Error(w, err.Error(), http.StatusInternalServerError)
258
+
return
262
259
}
260
+
261
+
w.Write([]byte("check success"))
263
262
264
263
return
265
264
}