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
commit903ce169a17cc82f5a22cb5814d5a59f5812c25f (patch)
treea742fb1d37a56191bb9e8abb8041cf243fd68f69 /api
parentForgot the openapi.json change. (diff)
downloadserver-903ce169a17cc82f5a22cb5814d5a59f5812c25f.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,