| 133 | #[with_middleware(guard = use_is_authorized_admin(&call_context()))] |
| 134 | #[with_middleware(tail = use_canister_call_metric("edit_registry_entry", &result))] |
| 135 | pub async fn edit_registry_entry( |
| 136 | &self, |
| 137 | input: EditRegistryEntryInput, |
| 138 | ) -> ApiResult<EditRegistryEntryResponse> { |
| 139 | let entry_id = HelperMapper::to_uuid(input.id).expect("Invalid registry entry id"); |
| 140 | let edited_entry = self |
| 141 | .registry_service |
| 142 | .edit(entry_id.as_bytes(), input.entry)?; |
| 143 | |
| 144 | Ok(EditRegistryEntryResponse { |
| 145 | entry: edited_entry.into(), |
| 146 | }) |
| 147 | } |
| 148 | |
| 149 | /// Deletes an existing registry entry. |
| 150 | #[with_middleware(guard = use_is_authorized_admin(&call_context()))] |