Make icon marketplace upload endpoint

This commit is contained in:
2026-01-24 00:16:16 -07:00
parent bfd5d460c9
commit 0ae6a37bf6
5 changed files with 226 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import { Context } from 'elysia'
import axios from 'axios'
import FormData from 'form-data'
import nodemailer from 'nodemailer'
import { createHash } from 'crypto'
export function jsonResponse (data: any, status = 200) {
return new Response(JSON.stringify(data, null, 2), {
@@ -145,3 +146,7 @@ export const sendEmail = async (to: string, title: string, body: string) => {
return await transporter.sendMail(mailOptions)
}
export function hash (input: string, type: string): string {
return createHash(type).update(input).digest('hex')
}