This is the prizes controller class. it handles the documentation of routes and implementation of services related to the prizes route.

Tag

Hierarchy

  • PrizesController

Constructors

Properties

prizeProposalsService: PrizeProposalsService

Methods

  • The function approveProposal is an asynchronous function that takes an id parameter and calls the approve method of the prizeProposalsService with the given id.

    Parameters

    • id: string

    Returns Promise<void>

    Date

    9/25/2023 - 5:35:35 AM

    Security

    bearer

    Async

  • The code snippet you provided is a method in the PrizesController class. It is a route handler for the POST request to /proposals endpoint. Here's a breakdown of what it does:

    Parameters

    Returns Promise<PrizeProposals>

    Summary

    Create a new proposal using user auth token to know which user is calling this function

    Date

    9/25/2023 - 4:44:05 AM

    Async

    Security

    bearer

  • The code snippet you provided is a method in the PrizesController class. It is a route handler for the GET request to /proposals endpoint. Here's a breakdown of what it does: Gets page

    Parameters

    • Optional query: PrzieQuery

    Returns Promise<Readonly<{
        data: PrizeProposals[];
        hasNextPage: boolean;
    }>>

    Summary

    Get all Pending proposals

    Date

    9/25/2023 - 4:06:45 AM

    Security

    bearer

    Async

  • Get pending proposal of user

    Parameters

    • Optional query: PrzieQuery = ...
    • userId: string

    Returns Promise<Readonly<{
        data: PrizeProposals[];
        hasNextPage: boolean;
    }>>

    Date

    9/25/2023 - 4:47:51 AM

    Summary

    Get pending proposals,

    Async

  • Admin Reject proposal

    Parameters

    Returns Promise<void>

    Date

    9/25/2023 - 5:19:58 AM

    Summary

    Reject Proposal,

    Async

    Security

    bearer

Generated using TypeDoc