MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / updateEmail

Function updateEmail

api/src/routes/protected/settings.ts:834–848  ·  view source on GitHub ↗
(
    fastify: FastifyInstance,
    { id, email }: { id: string; email: string }
  )

Source from the content-addressed store, hash-verified

832 } as const;
833
834 async function updateEmail(
835 fastify: FastifyInstance,
836 { id, email }: { id: string; email: string }
837 ) {
838 await fastify.prisma.user.update({
839 where: { id },
840 data: {
841 email,
842 emailAuthLinkTTL: null,
843 emailVerified: true,
844 emailVerifyTTL: null,
845 newEmail: null
846 }
847 });
848 }
849
850 async function deleteAuthToken(
851 fastify: FastifyInstance,

Callers 1

settingRedirectRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected