import { IHeader } from "@fluidframework/gitresources" ; import { Router } from "express" ; import nconf from "nconf" ; import * as utils from "../utils" ; export async function getHeader ( store , tenantId , authorization , sha , useCache ) { throw new Error ( "Not implemented" ) ; } export async function getTree ( store , tenantId , authorization , sha , useCache ) { throw new Error ( "Not implemented" ) ; } export function create ( store ) { const router = Router ( ) ; router . get ( "/repos/:ignored?/:tenantId/headers/:sha" , ( request , response ) => { const useCache = ! ( "disableCache" in request . query ) ; const headerP = getHeader ( store , request . params . tenantId , request . get ( "Authorization" ) , request . params . sha , useCache ) ; utils . handleResponse ( headerP , response , useCache ) ; } ) ; router . get ( "/repos/:ignored?/:tenantId/tree/:sha" , ( request , response ) => { const useCache = ! ( "disableCache" in request . query ) ; const headerP = getTree ( store , request . params . tenantId , request . get ( "Authorization" ) , request . params . sha , useCache ) ; utils . handleResponse ( headerP , response , useCache ) ; } ) ; return router ; }