Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

getActionByID returns collection response #202

Description

@zhaoqin-github

Need to fix this.

  @get(prefix + '/rules/{ruleId}/actions/{actionId}', {
    responses: {
      '200': Schema.collectionResponse(
        Action,
        'Successfully retrieve action resources',
      ),
    },
  })
  async getActionByID(
    @param(Schema.pathParameter('ruleId', 'Rule resource ID'))
    ruleId: string,
    @param(Schema.pathParameter('actionId', 'Action resource ID'))
    actionId: string,
  ): Promise<CollectionResponse> {
    const data = await this.ruleRepository
      .actions(ruleId)
      .find({where: {id: actionId}}, {tenantId: await this.tenantId});
    return new CollectionResponse(Action, data);
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions