MCPcopy Create free account
hub / github.com/dfinity/orbit / edit

Method edit

core/station/impl/src/services/user_group.rs:130–142  ·  view source on GitHub ↗
(&self, input: EditUserGroupOperationInput)

Source from the content-addressed store, hash-verified

128 }
129
130 pub async fn edit(&self, input: EditUserGroupOperationInput) -> ServiceResult<UserGroup> {
131 let mut user_group = self.get(&input.user_group_id)?;
132
133 user_group.name = input.name.to_string();
134 user_group.last_modification_timestamp = next_time();
135
136 user_group.validate()?;
137
138 self.user_group_repository
139 .insert(user_group.id, user_group.clone());
140
141 Ok(user_group)
142 }
143
144 pub async fn remove(&self, id: &UUID) -> ServiceResult<()> {
145 let user_group = self.get(id)?;

Callers

nothing calls this directly

Calls 4

next_timeFunction · 0.50
getMethod · 0.45
validateMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected