feat: scope articles by brand
This commit is contained in:
@@ -134,6 +134,11 @@ func (s *KolGenerationService) GetSchema(ctx context.Context, actor auth.Actor,
|
||||
}
|
||||
|
||||
func (s *KolGenerationService) Submit(ctx context.Context, actor auth.Actor, subPromptID int64, req KolGenerationSubmitRequest) (*KolGenerationSubmitResponse, error) {
|
||||
brandID, err := requireCurrentBrandID(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
row, prompt, err := s.loadAuthorizedPrompt(ctx, actor, subPromptID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -253,6 +258,7 @@ func (s *KolGenerationService) Submit(ctx context.Context, actor auth.Actor, sub
|
||||
|
||||
articleID, err := articleTx.CreateArticle(ctx, repository.CreateArticleInput{
|
||||
TenantID: actor.TenantID,
|
||||
BrandID: brandID,
|
||||
SourceType: kolGenerationTaskType,
|
||||
KolPromptID: &row.PromptID,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user