1 |
rakinar2 |
577 |
import { Request, Response } from "express"; |
2 |
|
|
import DiscordClient from "../../client/Client"; |
3 |
|
|
import UnverifiedMember from "../../models/UnverifiedMember"; |
4 |
|
|
import auth from "../Auth"; |
5 |
|
|
import guildAuth from "../GuildAuth"; |
6 |
|
|
import { Route } from "../Router"; |
7 |
|
|
|
8 |
|
|
export default <Route> { |
9 |
|
|
path: '/verification/:guild', |
10 |
|
|
middleware: [guildAuth], |
11 |
|
|
async get(req: Request, res: Response) { |
12 |
|
|
await res.json(await UnverifiedMember.findAll({ |
13 |
|
|
where: { |
14 |
|
|
guild_id: req.params.guild |
15 |
|
|
}, |
16 |
|
|
order: [ |
17 |
|
|
['id', 'DESC'] |
18 |
|
|
] |
19 |
|
|
})); |
20 |
|
|
} |
21 |
|
|
}; |