|
|
@@ -25,7 +25,14 @@ export async function GET(request: NextRequest) {
|
|
|
|
|
|
const data = await response.json()
|
|
|
|
|
|
- const { pool, lowerTick, upperTick } = data.result?.data as {
|
|
|
+ if (!data.result?.data) {
|
|
|
+ return NextResponse.json(
|
|
|
+ { retCode: 404, retMsg: '未找到仓位数据' },
|
|
|
+ { status: 404 }
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ const { pool, lowerTick, upperTick } = data.result.data as {
|
|
|
lowerTick: number
|
|
|
upperTick: number
|
|
|
pool: {
|