-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show lint, make ui dependent on api in docker
- Loading branch information
1 parent
a3b2800
commit e180a76
Showing
5 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { UVersionResponse } from '@/app/dto/VersionDTO'; | ||
import { PeerDBVersionResponse } from '@/grpc_generated/route'; | ||
import { GetFlowHttpAddressFromEnv } from '@/rpc/http'; | ||
|
||
export const dynamic = 'force-dynamic'; | ||
|
||
export async function GET() { | ||
const flowServiceAddr = GetFlowHttpAddressFromEnv(); | ||
try { | ||
const versionResponse: PeerDBVersionResponse = await fetch( | ||
`${flowServiceAddr}/v1/version` | ||
).then((res) => { | ||
return res.json(); | ||
}); | ||
let response: UVersionResponse = { | ||
version: versionResponse.version, | ||
}; | ||
return new Response(JSON.stringify(response)); | ||
} catch (error) { | ||
console.error('Error getting version:', error); | ||
return new Response(JSON.stringify({ error: error })); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export type UVersionResponse = { | ||
version: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters