import { Request , Response } from 'express' ; import { env } from '../env' ; import { GlobalSecret } from './global-secret' ; function serializeGlobalSecret ( secret ) { return { name : secret . name , protectedBranchesOnly : secret . protectedBranchesOnly , } ; } export async function listGlobalSecrets ( req , res ) { res . json ( env . METROLINE_GLOBAL_SECRETS . map ( serializeGlobalSecret ) ) ; }