1
1
mirror of https://github.com/Burn-E99/TheArtificer.git synced 2026-06-04 09:03:50 -04:00

move utils around

This commit is contained in:
Ean Milligan
2025-05-03 20:58:18 -04:00
parent 3e6844ed10
commit 9a5574f91e
42 changed files with 121 additions and 90 deletions

View File

@@ -10,7 +10,7 @@ import { verifyQueryHasParams } from 'endpoints/utils.ts';
import { generateApiDeleteEmail } from 'embeds/api.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiKeyDelete = async (query: Map<string, string>, apiUserid: bigint, apiUserEmail: string, apiUserDelCode: string): Promise<Response> => {
if (verifyQueryHasParams(query, ['user', 'email'])) {

View File

@@ -3,7 +3,7 @@ import dbClient from 'db/client.ts';
import stdResp from 'endpoints/stdResponses.ts';
import { verifyQueryHasParams } from 'endpoints/utils.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiChannel = async (query: Map<string, string>, apiUserid: bigint): Promise<Response> => {
if (verifyQueryHasParams(query, ['user'])) {

View File

@@ -10,7 +10,7 @@ import { verifyQueryHasParams } from 'endpoints/utils.ts';
import { generateApiKeyEmail } from 'embeds/api.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiKey = async (query: Map<string, string>): Promise<Response> => {
if (verifyQueryHasParams(query, ['user', 'email'])) {

View File

@@ -7,7 +7,7 @@ import dbClient from 'db/client.ts';
import stdResp from 'endpoints/stdResponses.ts';
import { verifyQueryHasParams } from 'endpoints/utils.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiKeyAdmin = async (query: Map<string, string>, apiUserid: bigint): Promise<Response> => {
if (verifyQueryHasParams(query, ['user', 'a'])) {

View File

@@ -13,7 +13,7 @@ import { queries } from 'db/common.ts';
import stdResp from 'endpoints/stdResponses.ts';
import { verifyQueryHasParams } from 'endpoints/utils.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
const apiWarning = `The following roll was conducted using my built in API. If someone in this channel did not request this roll, please report API abuse here: <${config.api.supportURL}>`;
@@ -116,7 +116,7 @@ export const apiRoll = async (query: Map<string, string>, apiUserid: bigint): Pr
} else {
// Alert API user that they messed up
return stdResp.Forbidden(
`Verify you are a member of the guild you are sending this roll to. If you are, the ${config.name} may not have that registered, please send a message in the guild so ${config.name} can register this. This registration is temporary, so if you see this error again, just poke your server again.`,
`Verify you are a member of the guild you are sending this roll to. If you are, the ${config.name} may not have that registered, please send a message in the guild so ${config.name} can register this. This registration is temporary, so if you see this error again, just poke your server again.`
);
}
} else {

View File

@@ -3,7 +3,7 @@ import dbClient from 'db/client.ts';
import stdResp from 'endpoints/stdResponses.ts';
import { verifyQueryHasParams } from 'endpoints/utils.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiChannelAdd = async (query: Map<string, string>, apiUserid: bigint): Promise<Response> => {
if (verifyQueryHasParams(query, ['user', 'channel'])) {

View File

@@ -3,7 +3,7 @@ import dbClient from 'db/client.ts';
import stdResp from 'endpoints/stdResponses.ts';
import { verifyQueryHasParams } from 'endpoints/utils.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiChannelManageActive = async (query: Map<string, string>, apiUserid: bigint, path: string): Promise<Response> => {
if (verifyQueryHasParams(query, ['user', 'channel'])) {

View File

@@ -5,7 +5,7 @@ import dbClient from 'db/client.ts';
import stdResp from 'endpoints/stdResponses.ts';
import { verifyQueryHasParams } from 'endpoints/utils.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiChannelManageBan = async (query: Map<string, string>, apiUserid: bigint, path: string): Promise<Response> => {
if (verifyQueryHasParams(query, ['user', 'channel', 'a'])) {

View File

@@ -5,7 +5,7 @@ import dbClient from 'db/client.ts';
import stdResp from 'endpoints/stdResponses.ts';
import { verifyQueryHasParams } from 'endpoints/utils.ts';
import utils from 'src/utils.ts';
import utils from 'utils/utils.ts';
export const apiKeyManage = async (query: Map<string, string>, apiUserid: bigint, path: string): Promise<Response> => {
if (verifyQueryHasParams(query, ['user', 'a'])) {