mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2024-12-29 10:56:15 +00:00
Merge pull request #21 from Fluffy-Bean/deepsource-transform-3b4884a8
style: format code with Prettier
This commit is contained in:
commit
2ef63ac6f6
|
@ -25,7 +25,9 @@ export async function getPopularToday(): Promise<Item[]> {
|
||||||
return cache["popular_today"];
|
return cache["popular_today"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getMenuItems(): Promise<{ name: string; items: Item[] }[]> {
|
export async function getMenuItems(): Promise<
|
||||||
|
{ name: string; items: Item[] }[]
|
||||||
|
> {
|
||||||
await fakeDelay(20);
|
await fakeDelay(20);
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
@ -66,7 +68,11 @@ export async function getItemByUUID(uuid: string): Promise<Item> {
|
||||||
return data[0];
|
return data[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function postContactEmail(name: string, email: string, message: string): Promise<string> {
|
export async function postContactEmail(
|
||||||
|
name: string,
|
||||||
|
email: string,
|
||||||
|
message: string
|
||||||
|
): Promise<string> {
|
||||||
await fakeDelay(200);
|
await fakeDelay(200);
|
||||||
|
|
||||||
if (!name) throw new Error("Name missing");
|
if (!name) throw new Error("Name missing");
|
||||||
|
@ -77,7 +83,9 @@ export async function postContactEmail(name: string, email: string, message: str
|
||||||
return "Check your email to confirm the message!";
|
return "Check your email to confirm the message!";
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function postVerifyCart(cartData: Record<string, CartItem>): Promise<Record<string, CartItem>> {
|
export async function postVerifyCart(
|
||||||
|
cartData: Record<string, CartItem>
|
||||||
|
): Promise<Record<string, CartItem>> {
|
||||||
let verifiedItems: Item[] = [];
|
let verifiedItems: Item[] = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -23,7 +23,7 @@ export type CartItem = {
|
||||||
|
|
||||||
export type JSONResponse = {
|
export type JSONResponse = {
|
||||||
data?: {
|
data?: {
|
||||||
item: Item[], // Todo Make this not just item type
|
item: Item[]; // Todo Make this not just item type
|
||||||
};
|
};
|
||||||
error?: string;
|
error?: string;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue