aufacicenta / pulsemarkets

pulsemarkets-v2-web.vercel.app
1 stars 3 forks source link

authenticate the request, only this server should be able to execute this endpoi... #144

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

https://api.github.com/aufacicenta/pulsemarkets/blob/22ddad1e2ff6df181ef3ad5577ab44a9a0c20db3/app/src/pages/api/prompt-wars/create-new-prompt-wars-market.ts#L24


import near from "providers/near";
import { PromptWarsMarketFactory } from "providers/near/contracts/prompt-wars-market-factory/contract";

// @TODO authenticate the request, only this server should be able to execute this endpoint
// labels: 100 USDT
export default async function Fn(_request: NextApiRequest, response: NextApiResponse) {
  try {
    // @TODO get image_uri from IPFS database, should not repeat.
netpoe commented 1 year ago

No need to authenticate, the contracts throw if it's not time to call the functions.