~cadence/Frames

36c786402fa5bfe08c8bbbc80d4376aec4eaac2c — Cadence Ember 1 year, 8 months ago e2f0592
Convert instance URL to lowercase after submitting
1 files changed, 4 insertions(+), 1 deletions(-)

M api/auth.js
M api/auth.js => api/auth.js +4 -1
@@ 26,6 26,7 @@ module.exports = [
				}
				if (!instance) return message(400, "Missing instance")
				if (!instance.match(/^https?:\/\//)) instance = "https://" + instance
				instance = instance.toLowerCase()

				let row
				try {


@@ 50,7 51,9 @@ module.exports = [

				let row
				try {
					row = await auth.getOrCreateApplication(params.get("instance"))
					let instance = params.get("instance")
					instance = instance.toLowerCase()
					row = await auth.getOrCreateApplication(instance)
				} catch (e) {
					console.error(e)
					return message(400, "Instance broke. How did you see this message?")