mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-26 04:28:17 +09:00
0e4a111f81
Resolve #7779
27 lines
492 B
TypeScript
27 lines
492 B
TypeScript
import define from '../../define';
|
|
import { getConnection } from 'typeorm';
|
|
|
|
export const meta = {
|
|
requireCredential: true as const,
|
|
requireModerator: true,
|
|
|
|
tags: ['admin'],
|
|
|
|
params: {
|
|
},
|
|
};
|
|
|
|
export default define(meta, async () => {
|
|
const stats = await
|
|
getConnection().query(`SELECT * FROM pg_indexes;`)
|
|
.then(recs => {
|
|
const res = [] as { tablename: string; indexname: string; }[];
|
|
for (const rec of recs) {
|
|
res.push(rec);
|
|
}
|
|
return res;
|
|
});
|
|
|
|
return stats;
|
|
});
|