We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// Create 创建内容 func (s *sContent) Create(ctx context.Context, in model.ContentCreateInput) (out model.ContentCreateOutput, err error) { if in.UserId == 0 { in.UserId = service.BizCtx().Get(ctx).User.Id } // 不允许HTML代码 if err = ghtml.SpecialCharsMapOrStruct(&in.ContentCreateUpdateBase); err != nil { return out, err } lastInsertID, err := dao.Content.Ctx(ctx).Data(in).InsertAndGetId() if err != nil { return out, err } return model.ContentCreateOutput{ContentId: uint(lastInsertID)}, err }
The text was updated successfully, but these errors were encountered:
不太会用github,第一次Issues,希望goframe越来越好!!!
Sorry, something went wrong.
No branches or pull requests
// Create 创建内容
func (s *sContent) Create(ctx context.Context, in model.ContentCreateInput) (out model.ContentCreateOutput, err error) {
if in.UserId == 0 {
in.UserId = service.BizCtx().Get(ctx).User.Id
}
// 不允许HTML代码
if err = ghtml.SpecialCharsMapOrStruct(&in.ContentCreateUpdateBase); err != nil {
return out, err
}
lastInsertID, err := dao.Content.Ctx(ctx).Data(in).InsertAndGetId()
if err != nil {
return out, err
}
return model.ContentCreateOutput{ContentId: uint(lastInsertID)}, err
}
The text was updated successfully, but these errors were encountered: