File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ pub struct Endpoint {
2626impl Endpoint {
2727 /// Converts Endpoint to resource. Does not save it.
2828 pub fn to_resource ( & self , store : & impl Storelike ) -> AtomicResult < Resource > {
29- let subject = format ! ( "{}{}" , store. get_server_url( ) , self . path) ;
29+ let subject = store
30+ . get_server_url ( )
31+ . clone ( )
32+ . set_path ( & self . path )
33+ . to_string ( ) ;
3034 let mut resource = store. get_resource_new ( & subject) ;
3135 resource. set_propval_string ( urls:: DESCRIPTION . into ( ) , & self . description , store) ?;
3236 resource. set_propval_string ( urls:: SHORTNAME . into ( ) , & self . shortname , store) ?;
@@ -42,6 +46,14 @@ impl Endpoint {
4246 }
4347}
4448
49+ impl std:: fmt:: Debug for Endpoint {
50+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
51+ f. debug_struct ( "Endpoint" )
52+ . field ( "path" , & self . path )
53+ . finish ( )
54+ }
55+ }
56+
4557pub fn default_endpoints ( ) -> Vec < Endpoint > {
4658 vec ! [
4759 plugins:: versioning:: version_endpoint( ) ,
You can’t perform that action at this time.
0 commit comments