Class

PromptService

PromptService()

Prompt Service

Constructor

# new PromptService()

View Source services/prompt.service.js, line 6

Methods

# async getPromptByName(name) → {Promise.<(IPrompt|null)>}

Retrieves a prompt by its name from the database.

Parameters:
Name Type Description
name string

The name of the prompt to retrieve.

View Source services/prompt.service.js, line 14

If no prompt with the specified name is found or if a database error occurs.

Error
  • The prompt object if found.
Promise.<(IPrompt|null)>