RSS
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const constants = require("../../lib/constants")
|
||||
const {fetchUser} = require("../../lib/collectors")
|
||||
|
||||
function reply(statusCode, content) {
|
||||
@@ -9,7 +10,7 @@ function reply(statusCode, content) {
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
{route: "/api/user/(\\w+)", methods: ["GET"], code: async ({fill}) => {
|
||||
{route: `/api/user/(${constants.external.username_regex})`, methods: ["GET"], code: async ({fill}) => {
|
||||
const user = await fetchUser(fill[0])
|
||||
const data = user.export()
|
||||
return reply(200, data)
|
||||
|
||||
Reference in New Issue
Block a user