( ctx context.Context, req *userv1.DeletePromptRequest, )
| 9 | ) |
| 10 | |
| 11 | func (s *UserServer) DeletePrompt( |
| 12 | ctx context.Context, |
| 13 | req *userv1.DeletePromptRequest, |
| 14 | ) (*userv1.DeletePromptResponse, error) { |
| 15 | actor, err := contextutil.GetActor(ctx) |
| 16 | if err != nil { |
| 17 | return nil, err |
| 18 | } |
| 19 | |
| 20 | if req.GetPromptId() == "" { |
| 21 | return nil, shared.ErrBadRequest("prompt_id cannot be empty") |
| 22 | } |
| 23 | |
| 24 | err = s.promptService.DeletePrompt(ctx, actor.ID, req.GetPromptId()) |
| 25 | if err != nil { |
| 26 | return nil, err |
| 27 | } |
| 28 | |
| 29 | return &userv1.DeletePromptResponse{}, nil |
| 30 | } |
nothing calls this directly
no test coverage detected