mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
The post register endpoint will send a random 5 digit code via sms and another via email. If either code fails to send, the user will not be created and the person can register again. The codes are saved to the session cookie, and expire in 1 hour. Another iteration of this story will save the codes to a database.
132 lines
2.5 KiB
Python
132 lines
2.5 KiB
Python
from flask import render_template
|
|
from flask_login import login_required
|
|
|
|
from app.main import main
|
|
|
|
|
|
@main.route('/')
|
|
def index():
|
|
return render_template('signedout.html')
|
|
|
|
|
|
@main.route("/govuk")
|
|
def govuk():
|
|
return render_template('govuk_template.html')
|
|
|
|
|
|
@main.route("/register-from-invite")
|
|
def registerfrominvite():
|
|
return render_template('register-from-invite.html')
|
|
|
|
|
|
@main.route("/verify")
|
|
def verify():
|
|
return render_template('verify.html')
|
|
|
|
|
|
@main.route("/verify-mobile")
|
|
def verifymobile():
|
|
return render_template('verify-mobile.html')
|
|
|
|
|
|
@main.route("/text-not-received-2")
|
|
def textnotreceived2():
|
|
return render_template('text-not-received-2.html')
|
|
|
|
|
|
@main.route("/dashboard")
|
|
@login_required
|
|
def dashboard():
|
|
return render_template('dashboard.html')
|
|
|
|
|
|
@main.route("/add-service")
|
|
@login_required
|
|
def addservice():
|
|
return render_template('add-service.html')
|
|
|
|
|
|
@main.route("/two-factor")
|
|
def twofactor():
|
|
return render_template('two-factor.html')
|
|
|
|
|
|
@main.route("/send-sms")
|
|
def sendsms():
|
|
return render_template('send-sms.html')
|
|
|
|
|
|
@main.route("/check-sms")
|
|
def checksms():
|
|
return render_template('check-sms.html')
|
|
|
|
|
|
@main.route("/email-not-received")
|
|
def emailnotreceived():
|
|
return render_template('email-not-received.html')
|
|
|
|
|
|
@main.route("/text-not-received")
|
|
def textnotreceived():
|
|
return render_template('text-not-received.html')
|
|
|
|
|
|
@main.route("/send-email")
|
|
def sendemail():
|
|
return render_template('send-email.html')
|
|
|
|
|
|
@main.route("/check-email")
|
|
def checkemail():
|
|
return render_template('check-email.html')
|
|
|
|
|
|
@main.route("/jobs")
|
|
def showjobs():
|
|
return render_template('jobs.html')
|
|
|
|
|
|
@main.route("/jobs/job")
|
|
def showjob():
|
|
return render_template('job.html')
|
|
|
|
|
|
@main.route("/jobs/job/notification")
|
|
def shownotification():
|
|
return render_template('notification.html')
|
|
|
|
|
|
@main.route("/forgot-password")
|
|
def forgotpassword():
|
|
return render_template('forgot-password.html')
|
|
|
|
|
|
@main.route("/new-password")
|
|
def newpassword():
|
|
return render_template('new-password.html')
|
|
|
|
|
|
@main.route("/user-profile")
|
|
def userprofile():
|
|
return render_template('user-profile.html')
|
|
|
|
|
|
@main.route("/manage-users")
|
|
def manageusers():
|
|
return render_template('manage-users.html')
|
|
|
|
|
|
@main.route("/service-settings")
|
|
def servicesettings():
|
|
return render_template('service-settings.html')
|
|
|
|
|
|
@main.route("/api-keys")
|
|
def apikeys():
|
|
return render_template('api-keys.html')
|
|
|
|
|
|
@main.route("/verification-not-received")
|
|
def verificationnotreceived():
|
|
return render_template('verification-not-received.html')
|