final app for testing and deployment
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Main routes for QR Code Manager
|
||||
"""
|
||||
|
||||
from flask import Blueprint, render_template
|
||||
from flask import Blueprint, render_template, redirect, abort
|
||||
from app.utils.auth import login_required
|
||||
from app.utils.link_manager import LinkPageManager
|
||||
|
||||
@@ -44,3 +44,12 @@ def health_check():
|
||||
from datetime import datetime
|
||||
from flask import jsonify
|
||||
return jsonify({'status': 'healthy', 'timestamp': datetime.now().isoformat()})
|
||||
|
||||
@bp.route('/s/<short_code>')
|
||||
def redirect_short_url(short_code):
|
||||
"""Redirect short URL to original URL"""
|
||||
original_url = link_manager.resolve_short_url(short_code)
|
||||
if original_url:
|
||||
return redirect(original_url)
|
||||
else:
|
||||
abort(404)
|
||||
|
||||
Reference in New Issue
Block a user