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

Function formatMessage

api/src/plugins/redirect-with-message.ts:43–52  ·  view source on GitHub ↗
(message: Message)

Source from the content-addressed store, hash-verified

41 * @returns The formatted message string.
42 */
43export function formatMessage(message: Message): string {
44 return qs.stringify(
45 {
46 messages: qs.stringify(prepareMessage(message), {
47 arrayFormat: 'index'
48 })
49 },
50 { arrayFormat: 'index' }
51 );
52}
53
54const plugin: FastifyPluginCallback = (fastify, _options, done) => {
55 fastify.decorateReply('redirectWithMessage', redirectWithMessage);

Callers 6

settings.test.tsFile · 0.85
redirectWithMessageFunction · 0.85
not-found.test.tsFile · 0.85
bouncer.test.tsFile · 0.85
auth0.test.tsFile · 0.85

Calls 1

prepareMessageFunction · 0.85

Tested by

no test coverage detected