From a4d148887f8618f4b21748d32c17109dcff95404 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') 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