chore: move ICreateGuildRequest to createGuildController
This commit is contained in:
parent
ff4b1e5c29
commit
be59a631db
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user