Skip to content

Commit 36c5212

Browse files
Revert "fix: next plan data error send next plan data separated"
This reverts commit 28428af.
1 parent b10cde0 commit 36c5212

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

app/operation/subscription.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,26 +154,25 @@ async def user_subscription(
154154
links = conf.splitlines()
155155

156156
format_variables = await self.get_format_variables(user)
157-
next_plan = user.next_plan.model_dump(mode="json") if user.next_plan else None
158157

159158
return HTMLResponse(
160159
render_template(
161160
template,
162161
{
163162
"user": user,
164-
"next_plan": next_plan,
165163
"links": links,
166164
"apps": self._make_apps_import_urls(sub_settings.applications, format_variables),
167165
},
168166
)
169167
)
170-
client_type = await self.detect_client_type(user_agent, sub_settings.rules)
171-
if client_type == ConfigFormat.block or not client_type:
172-
await self.raise_error(message="Client not supported", code=406)
173-
174-
# Update user subscription info
175-
await user_sub_update(db, db_user.id, user_agent)
176-
conf, media_type = await self.fetch_config(user, client_type)
168+
else:
169+
client_type = await self.detect_client_type(user_agent, sub_settings.rules)
170+
if client_type == ConfigFormat.block or not client_type:
171+
await self.raise_error(message="Client not supported", code=406)
172+
173+
# Update user subscription info
174+
await user_sub_update(db, db_user.id, user_agent)
175+
conf, media_type = await self.fetch_config(user, client_type)
177176

178177
# Create response with appropriate headers
179178
return Response(content=conf, media_type=media_type, headers=response_headers)

0 commit comments

Comments
 (0)