示例#1
0
文件: fyidb.go 项目: kiwih/heyfyi
func (s *DatabaseStorage) ModerateFact(f *fact.Fact, enable bool) error {
	f.AwaitModeration = enable
	return s.dbGorm.Save(f).Error
}
示例#2
0
文件: fyidb.go 项目: kiwih/heyfyi
func (s *DatabaseStorage) CreateFact(f *fact.Fact) error {
	f.AwaitModeration = true
	return s.dbGorm.Create(f).Error
}