MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / UpdateAbilityByTag

Function UpdateAbilityByTag

model/ability.go:301–313  ·  view source on GitHub ↗
(tag string, newTag *string, priority *int64, weight *uint)

Source from the content-addressed store, hash-verified

299}
300
301func UpdateAbilityByTag(tag string, newTag *string, priority *int64, weight *uint) error {
302 ability := Ability{}
303 if newTag != nil {
304 ability.Tag = newTag
305 }
306 if priority != nil {
307 ability.Priority = priority
308 }
309 if weight != nil {
310 ability.Weight = *weight
311 }
312 return DB.Model(&Ability{}).Where("tag = ?", tag).Updates(ability).Error
313}
314
315var fixLock = sync.Mutex{}
316

Callers 1

EditChannelByTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected