From cc3b44891bc1e4a6abfcc215850af43bce0d0f17 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Mon, 26 Sep 2022 15:56:47 -0400 Subject: [PATCH] Add user to market followers in create answer --- functions/src/create-answer.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/src/create-answer.ts b/functions/src/create-answer.ts index cc05d817..911f3b8c 100644 --- a/functions/src/create-answer.ts +++ b/functions/src/create-answer.ts @@ -7,6 +7,7 @@ import { getNewMultiBetInfo } from '../../common/new-bet' import { Answer, MAX_ANSWER_LENGTH } from '../../common/answer' import { getValues } from './utils' import { APIError, newEndpoint, validate } from './api' +import { addUserToContractFollowers } from './follow-market' const bodySchema = z.object({ contractId: z.string().max(MAX_ANSWER_LENGTH), @@ -96,6 +97,8 @@ export const createanswer = newEndpoint(opts, async (req, auth) => { return answer }) + await addUserToContractFollowers(contractId, auth.uid) + return answer })