summary refs log tree commit diff
path: root/api/src/routes/store
diff options
context:
space:
mode:
authoruurgothat <cckhmck@gmail.com>2021-09-30 17:57:51 +0300
committeruurgothat <cckhmck@gmail.com>2021-09-30 17:57:51 +0300
commit9e07c72a72e60ca8c3c3e6270867accd32b56ece (patch)
tree730cedf62e5075fd3f3d165d3e1fcbb1a81b91db /api/src/routes/store
parentMerge pull request #402 from Thesourtimes/master (diff)
downloadserver-9e07c72a72e60ca8c3c3e6270867accd32b56ece.tar.xz
Add misc routes
Diffstat (limited to 'api/src/routes/store')
-rw-r--r--api/src/routes/store/published-listings/applications.ts (renamed from api/src/routes/store/applications/#id/index.ts)0
-rw-r--r--api/src/routes/store/published-listings/applications/#id/subscription-plans.ts24
-rw-r--r--api/src/routes/store/published-listings/skus.ts (renamed from api/src/routes/store/skus/#id/index.ts)0
-rw-r--r--api/src/routes/store/published-listings/skus/#id/subscription-plans.ts24
4 files changed, 48 insertions, 0 deletions
diff --git a/api/src/routes/store/applications/#id/index.ts b/api/src/routes/store/published-listings/applications.ts
index 53b61c29..53b61c29 100644
--- a/api/src/routes/store/applications/#id/index.ts
+++ b/api/src/routes/store/published-listings/applications.ts
diff --git a/api/src/routes/store/published-listings/applications/#id/subscription-plans.ts b/api/src/routes/store/published-listings/applications/#id/subscription-plans.ts
new file mode 100644
index 00000000..77f949d9
--- /dev/null
+++ b/api/src/routes/store/published-listings/applications/#id/subscription-plans.ts
@@ -0,0 +1,24 @@
+import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
+
+const router: Router = Router();
+
+router.get("/", route({}), async (req: Request, res: Response) => {
+	//TODO
+	res.json([
+        {
+            id: "",
+            name: "",
+            interval: 1,
+            interval_count: 1,
+            tax_inclusive: true,
+            sku_id: "",
+            fallback_price: 499,
+            fallback_currency: "eur",
+            currency: "eur",
+            price: 4199,
+            price_tier: null
+        }]).status(200);
+});
+
+export default router;
diff --git a/api/src/routes/store/skus/#id/index.ts b/api/src/routes/store/published-listings/skus.ts
index 53b61c29..53b61c29 100644
--- a/api/src/routes/store/skus/#id/index.ts
+++ b/api/src/routes/store/published-listings/skus.ts
diff --git a/api/src/routes/store/published-listings/skus/#id/subscription-plans.ts b/api/src/routes/store/published-listings/skus/#id/subscription-plans.ts
new file mode 100644
index 00000000..77f949d9
--- /dev/null
+++ b/api/src/routes/store/published-listings/skus/#id/subscription-plans.ts
@@ -0,0 +1,24 @@
+import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
+
+const router: Router = Router();
+
+router.get("/", route({}), async (req: Request, res: Response) => {
+	//TODO
+	res.json([
+        {
+            id: "",
+            name: "",
+            interval: 1,
+            interval_count: 1,
+            tax_inclusive: true,
+            sku_id: "",
+            fallback_price: 499,
+            fallback_currency: "eur",
+            currency: "eur",
+            price: 4199,
+            price_tier: null
+        }]).status(200);
+});
+
+export default router;