GetTaskPluginSource loads one override's JavaScript by row id. Rows never change source in place (SaveTaskPlugin rejects a different source for the same key and version), so the id from a sync snapshot identifies exactly the text whose SourceHash that snapshot reported.
(id int64)
| 245 | // same key and version), so the id from a sync snapshot identifies exactly the |
| 246 | // text whose SourceHash that snapshot reported. |
| 247 | func GetTaskPluginSource(id int64) (LongText, error) { |
| 248 | var plugin TaskPlugin |
| 249 | err := DB.Select("source").Where(&TaskPlugin{Id: id}).Take(&plugin).Error |
| 250 | return plugin.Source, err |
| 251 | } |
| 252 | |
| 253 | func ActivateTaskPlugin(key, version string) error { |
| 254 | err := DB.Transaction(func(tx *gorm.DB) error { |
no outgoing calls