chore: move ICreateGuildRequest to createGuildController

This commit is contained in:
Sainan 2025-01-03 01:37:07 +01:00
parent ff4b1e5c29
commit be59a631db
2 changed files with 4 additions and 7 deletions

View File

@ -3,9 +3,8 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
import { getJSONfromString } from "@/src/helpers/stringHelpers";
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
import { Guild } from "@/src/models/guildModel";
import { ICreateGuildRequest } from "@/src/types/guildTypes";
const createGuildController: RequestHandler = async (req, res) => {
export const createGuildController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req);
const payload = getJSONfromString(String(req.body)) as ICreateGuildRequest;
@ -34,4 +33,6 @@ const createGuildController: RequestHandler = async (req, res) => {
res.json(guild);
};
export { createGuildController };
interface ICreateGuildRequest {
guildName: string;
}

View File

@ -13,10 +13,6 @@ export interface IGuildDatabase extends IGuild {
DojoEnergy: number;
}
export interface ICreateGuildRequest {
guildName: string;
}
export interface IDojoClient {
_id: IOid; // ID of the guild
Name: string;