Skip to content

Commit 78451fc

Browse files
committed
Remove GET /account/:address/balance-history/count
It causes a performance issue as the table gets bigger.
1 parent f4413fe commit 78451fc

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/routers/account.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -202,28 +202,4 @@ export function handle(_C: IndexerContext, router: Router) {
202202
}
203203
}
204204
);
205-
206-
router.get(
207-
"/account/:address/balance-history/count",
208-
validate({
209-
params: { address: platformAddressSchema },
210-
query: { ...reasonFilterSchema }
211-
}),
212-
async (req, res, next) => {
213-
try {
214-
const reasonFilter = req.query.reasonFilter;
215-
const address = req.params.address;
216-
res.json(
217-
await CCCChangeModel.getCountByAddress(address, {
218-
reasonFilter:
219-
typeof reasonFilter === "string"
220-
? reasonFilter.split(",")
221-
: undefined
222-
})
223-
);
224-
} catch (e) {
225-
next(e);
226-
}
227-
}
228-
);
229205
}

0 commit comments

Comments
 (0)