File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/epsilon/server/instances Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ pub async fn create(
16
16
template : & str ,
17
17
content : Json < Value > ,
18
18
context : & State < Arc < Context > > ,
19
- ) -> Result < ( ) , EpsilonError > {
19
+ ) -> Result < String , EpsilonError > {
20
20
let instance_provider = context. get_instance_provider ( ) ;
21
21
22
- instance_provider
22
+ let instance = instance_provider
23
23
. start_instance ( template, Some ( content. 0 ) )
24
24
. await
25
25
. map_err ( |_| {
@@ -31,7 +31,9 @@ pub async fn create(
31
31
32
32
info ! ( "An instance has been created (template={})" , template) ;
33
33
34
- Ok ( ( ) )
34
+ Ok ( serde_json:: to_string ( & instance. to_json ( ) . await ?)
35
+ . map_err ( |_| EpsilonError :: ParseJsonError ( "Create Instance" . to_owned ( ) ) ) ?
36
+ )
35
37
}
36
38
37
39
#[ rocket:: post( "/close/<instance>" ) ]
You can’t perform that action at this time.
0 commit comments