summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorIratu <me@iratu.pro>2022-02-16 22:00:13 +0000
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-02-18 19:50:11 +0300
commit46f77f8e380b3e377e72c4bdab3d888b903d00af (patch)
tree600b52ce6365e015e9e4a2f0de112b576c62f862 /api
parentForgot the openapi.json change. (diff)
downloadserver-46f77f8e380b3e377e72c4bdab3d888b903d00af.tar.xz
changed user.premium_since to also load from the database.
Diffstat (limited to 'api')
-rw-r--r--api/assets/openapi.json4
-rw-r--r--api/src/routes/users/#id/profile.ts2
2 files changed, 5 insertions, 1 deletions
diff --git a/api/assets/openapi.json b/api/assets/openapi.json
index 33118b4b..1af0600d 100644
--- a/api/assets/openapi.json
+++ b/api/assets/openapi.json
@@ -2821,6 +2821,10 @@
 						"type": "string",
 						"format": "date-time"
 					},
+					"premium_since": {
+						"type": "string",
+						"format": "date-time"
+					},
 					"verified": {
 						"type": "boolean"
 					},
diff --git a/api/src/routes/users/#id/profile.ts b/api/src/routes/users/#id/profile.ts
index 06be66ae..4dbb84cf 100644
--- a/api/src/routes/users/#id/profile.ts
+++ b/api/src/routes/users/#id/profile.ts
@@ -39,7 +39,7 @@ router.get("/", route({ test: { response: { body: "UserProfileResponse" } } }),
 	res.json({
 		connected_accounts: user.connected_accounts,
 		premium_guild_since: premium_guild_since, // TODO
-		premium_since: null, // TODO
+		premium_since: user.premium_since, // TODO
 		mutual_guilds: mutual_guilds, // TODO {id: "", nick: null} when ?with_mutual_guilds=true
 		user: {
 			username: user.username,