Basic code quality stuff
This commit is contained in:
parent
53050c48fb
commit
d1c0269a81
18 changed files with 84 additions and 85 deletions
|
@ -2,15 +2,15 @@ import { Handler } from '@netlify/functions'
|
|||
import { api } from "./shared/api"
|
||||
import { HacktheboxInfo } from '../../src/components/infos/Hackthebox'
|
||||
|
||||
const handler: Handler = async (event, context) => {
|
||||
let hackthebox: {profile: {activity: HacktheboxInfo[]}} = await api<{
|
||||
const handler: Handler = async () => {
|
||||
const hackthebox: {profile: {activity: HacktheboxInfo[]}} = await api<{
|
||||
profile: {
|
||||
activity: HacktheboxInfo[]
|
||||
}
|
||||
}>
|
||||
(`https://www.hackthebox.com/api/v4/profile/activity/1063999`)
|
||||
|
||||
let pwn = hackthebox.profile.activity.find((a: HacktheboxInfo) => a!.object_type === "machine")
|
||||
const pwn = hackthebox.profile.activity.find((a: HacktheboxInfo) => a!.object_type === "machine")
|
||||
if (!pwn) {
|
||||
return {
|
||||
statusCode: 404,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue