MCPcopy Index your code
hub / github.com/simstudioai/sim / railwayHeaders

Function railwayHeaders

apps/sim/tools/railway/utils.ts:14–33  ·  view source on GitHub ↗
(
  apiKey: string,
  tokenType?: RailwayTokenType
)

Source from the content-addressed store, hash-verified

12}
13
14export function railwayHeaders(
15 apiKey: string,
16 tokenType?: RailwayTokenType
17): Record<string, string> {
18 if (!apiKey) {
19 throw new Error('Missing API token for Railway API request')
20 }
21
22 if (tokenType === 'project') {
23 return {
24 'Content-Type': 'application/json',
25 'Project-Access-Token': apiKey,
26 }
27 }
28
29 return {
30 'Content-Type': 'application/json',
31 Authorization: `Bearer ${apiKey}`,
32 }
33}
34
35export async function parseRailwayGraphqlResponse<TData>(
36 response: Response

Callers 15

create_project.tsFile · 0.90
list_variables.tsFile · 0.90
create_service.tsFile · 0.90
get_deployment.tsFile · 0.90
upsert_variable.tsFile · 0.90
deploy_service.tsFile · 0.90
update_project.tsFile · 0.90
delete_project.tsFile · 0.90
delete_service.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected