From 0baa7cf4a5eb4abb3761e868ca48030db604649b Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 10 Jun 2024 12:33:05 -0500 Subject: Generalise `render_ur` for the resources pages --- gn2/wqflask/oauth2/resources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gn2/wqflask/oauth2') diff --git a/gn2/wqflask/oauth2/resources.py b/gn2/wqflask/oauth2/resources.py index afba2526..42fdae37 100644 --- a/gn2/wqflask/oauth2/resources.py +++ b/gn2/wqflask/oauth2/resources.py @@ -4,7 +4,7 @@ from flask import ( flash, request, url_for, redirect, Response, Blueprint) from . import client -from .ui import render_ui +from .ui import render_ui as _render_ui from .checks import require_oauth2 from .client import oauth2_get, oauth2_post from .request_utils import ( @@ -12,6 +12,9 @@ from .request_utils import ( resources = Blueprint("resource", __name__) +def render_ui(template, **kwargs): + return _render_ui(template, uipages="resources", **kwargs) + @resources.route("/", methods=["GET"]) @require_oauth2 def user_resources(): -- cgit v1.2.3