adds email confirmation
This commit is contained in:
@@ -237,7 +237,7 @@
|
|||||||
{formatSpeed(options.autoOptions.top_speed! / 3.6)}
|
{formatSpeed(options.autoOptions.top_speed! / 3.6)}
|
||||||
</p>
|
</p>
|
||||||
<hr class="border-input-border my-3" />
|
<hr class="border-input-border my-3" />
|
||||||
<p class="text-sm font-medium">{$_("width")}</p>
|
<p class="text-sm font-medium">{$_("car")} {$_("width")}</p>
|
||||||
<Slider
|
<Slider
|
||||||
minValue={1}
|
minValue={1}
|
||||||
maxValue={10}
|
maxValue={10}
|
||||||
@@ -248,7 +248,7 @@
|
|||||||
{options.autoOptions.width?.toFixed(1)}
|
{options.autoOptions.width?.toFixed(1)}
|
||||||
</p>
|
</p>
|
||||||
<hr class="border-input-border my-3" />
|
<hr class="border-input-border my-3" />
|
||||||
<p class="text-sm font-medium">{$_("height")}</p>
|
<p class="text-sm font-medium">{$_("car")} {$_("height")}</p>
|
||||||
<Slider
|
<Slider
|
||||||
minValue={1}
|
minValue={1}
|
||||||
maxValue={10}
|
maxValue={10}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "von",
|
"by": "von",
|
||||||
"can": "kann",
|
"can": "kann",
|
||||||
"cancel": "Abbrechen",
|
"cancel": "Abbrechen",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {Karte} other {Karten}}",
|
"card": "{n, plural, =1 {Karte} other {Karten}}",
|
||||||
"categories": "Kategorien",
|
"categories": "Kategorien",
|
||||||
"category": "Kategorie",
|
"category": "Kategorie",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Höhenunterschied (abw.)",
|
"elevation-loss": "Höhenunterschied (abw.)",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"email-updated": "E-Mail aktualisiert",
|
"email-updated": "E-Mail aktualisiert",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} hat noch keine Aktivitäten",
|
"empty-activities": "{username} hat noch keine Aktivitäten",
|
||||||
"empty-bio": "{username} hat noch keine Biographie hinzugefügt",
|
"empty-bio": "{username} hat noch keine Biographie hinzugefügt",
|
||||||
"empty-lists": "{username} hat keine öffentlichen Listen",
|
"empty-lists": "{username} hat keine öffentlichen Listen",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Speichere dein letztes Abenteuer, um loszulegen.",
|
"hero_section_1_text_alternative": "Speichere dein letztes Abenteuer, um loszulegen.",
|
||||||
"hero_section_2_text": "Wusstest du schon? Du kannst nicht nur deine Routen speichern. Es gibt viele Kategorien für alle deine Abenteuer.",
|
"hero_section_2_text": "Wusstest du schon? Du kannst nicht nur deine Routen speichern. Es gibt viele Kategorien für alle deine Abenteuer.",
|
||||||
"hiking": "Wandern",
|
"hiking": "Wandern",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Ungarisch",
|
"hungarian": "Ungarisch",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Icon",
|
"icon": "Icon",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "by",
|
"by": "by",
|
||||||
"can": "can",
|
"can": "can",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
|
"car": "Car",
|
||||||
"card": "{n, plural, =1 {Card} other {Cards}}",
|
"card": "{n, plural, =1 {Card} other {Cards}}",
|
||||||
"categories": "Categories",
|
"categories": "Categories",
|
||||||
"category": "Category",
|
"category": "Category",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Elevation Loss",
|
"elevation-loss": "Elevation Loss",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"email-updated": "Email updated",
|
"email-updated": "Email updated",
|
||||||
|
"email-verified": "Email verified",
|
||||||
"empty-activities": "{username} has no activity yet",
|
"empty-activities": "{username} has no activity yet",
|
||||||
"empty-bio": "{username} has not added a bio yet",
|
"empty-bio": "{username} has not added a bio yet",
|
||||||
"empty-lists": "{username} has no public lists",
|
"empty-lists": "{username} has no public lists",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Get started by saving your latest adventure.",
|
"hero_section_1_text_alternative": "Get started by saving your latest adventure.",
|
||||||
"hero_section_2_text": "Did you know? You cannot only save you hiking trails. There are many categories for all your adventures.",
|
"hero_section_2_text": "Did you know? You cannot only save you hiking trails. There are many categories for all your adventures.",
|
||||||
"hiking": "Hiking",
|
"hiking": "Hiking",
|
||||||
|
"home": "Home",
|
||||||
"hungarian": "Hungarian",
|
"hungarian": "Hungarian",
|
||||||
"hybrid": "Hybrid",
|
"hybrid": "Hybrid",
|
||||||
"icon": "Icon",
|
"icon": "Icon",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "de",
|
"by": "de",
|
||||||
"can": "puede",
|
"can": "puede",
|
||||||
"cancel": "Borrar",
|
"cancel": "Borrar",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, one {}=1 {Ficha} other {Fichas}}",
|
"card": "{n, plural, one {}=1 {Ficha} other {Fichas}}",
|
||||||
"categories": "Categorías",
|
"categories": "Categorías",
|
||||||
"category": "Categoría",
|
"category": "Categoría",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Descenso",
|
"elevation-loss": "Descenso",
|
||||||
"email": "Correo electrónico",
|
"email": "Correo electrónico",
|
||||||
"email-updated": "Correo electrónico actualizado",
|
"email-updated": "Correo electrónico actualizado",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} todavía no tiene actividad",
|
"empty-activities": "{username} todavía no tiene actividad",
|
||||||
"empty-bio": "{username} no ha añadido ninguna Bio todavía",
|
"empty-bio": "{username} no ha añadido ninguna Bio todavía",
|
||||||
"empty-lists": "{username} no tiene listas públicas",
|
"empty-lists": "{username} no tiene listas públicas",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Empieza guardando tu última aventuras.",
|
"hero_section_1_text_alternative": "Empieza guardando tu última aventuras.",
|
||||||
"hero_section_2_text": "¿Lo sabías? No solo puedes guardar tus rutas de senderismo. Hay muchas categorías para todas tus aventuras.",
|
"hero_section_2_text": "¿Lo sabías? No solo puedes guardar tus rutas de senderismo. Hay muchas categorías para todas tus aventuras.",
|
||||||
"hiking": "Senderismo",
|
"hiking": "Senderismo",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Húngaro",
|
"hungarian": "Húngaro",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Icono",
|
"icon": "Icono",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "par",
|
"by": "par",
|
||||||
"can": "peut",
|
"can": "peut",
|
||||||
"cancel": "Annuler",
|
"cancel": "Annuler",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {Tuile} other {Tuiles}}",
|
"card": "{n, plural, =1 {Tuile} other {Tuiles}}",
|
||||||
"categories": "Catégories",
|
"categories": "Catégories",
|
||||||
"category": "Catégorie",
|
"category": "Catégorie",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Dénivelé négatif",
|
"elevation-loss": "Dénivelé négatif",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"email-updated": "Adresse mail mise à jour",
|
"email-updated": "Adresse mail mise à jour",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} n'a encore aucune activité",
|
"empty-activities": "{username} n'a encore aucune activité",
|
||||||
"empty-bio": "{username} n'a pas encore de description",
|
"empty-bio": "{username} n'a pas encore de description",
|
||||||
"empty-lists": "{username} n'a pas de liste publique",
|
"empty-lists": "{username} n'a pas de liste publique",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Commencez par enregistrer votre dernière aventure.",
|
"hero_section_1_text_alternative": "Commencez par enregistrer votre dernière aventure.",
|
||||||
"hero_section_2_text": "Saviez-vous que vous pouvez sauvegarder plus que vos randonnées ? De nombreuses catégories sont disponibles pour toutes vos aventures.",
|
"hero_section_2_text": "Saviez-vous que vous pouvez sauvegarder plus que vos randonnées ? De nombreuses catégories sont disponibles pour toutes vos aventures.",
|
||||||
"hiking": "Randonnée",
|
"hiking": "Randonnée",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Hongrois",
|
"hungarian": "Hongrois",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Icône",
|
"icon": "Icône",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "by",
|
"by": "by",
|
||||||
"can": "can",
|
"can": "can",
|
||||||
"cancel": "Mégsem",
|
"cancel": "Mégsem",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {Kártya} other {Kártyák}}",
|
"card": "{n, plural, =1 {Kártya} other {Kártyák}}",
|
||||||
"categories": "Kategóriák",
|
"categories": "Kategóriák",
|
||||||
"category": "Kategória",
|
"category": "Kategória",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Elevation Loss",
|
"elevation-loss": "Elevation Loss",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"email-updated": "Email updated",
|
"email-updated": "Email updated",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} has no activity yet",
|
"empty-activities": "{username} has no activity yet",
|
||||||
"empty-bio": "{username} has not added a bio yet",
|
"empty-bio": "{username} has not added a bio yet",
|
||||||
"empty-lists": "{username} has no public lists",
|
"empty-lists": "{username} has no public lists",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Kezdje a legújabb kaland elmentésével.",
|
"hero_section_1_text_alternative": "Kezdje a legújabb kaland elmentésével.",
|
||||||
"hero_section_2_text": "Tudta? Nem csak a túraútvonalakat mentheti el. Számos kategória létezik minden kalandodhoz.",
|
"hero_section_2_text": "Tudta? Nem csak a túraútvonalakat mentheti el. Számos kategória létezik minden kalandodhoz.",
|
||||||
"hiking": "Hiking",
|
"hiking": "Hiking",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Magyar",
|
"hungarian": "Magyar",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Ikon",
|
"icon": "Ikon",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "di",
|
"by": "di",
|
||||||
"can": "può",
|
"can": "può",
|
||||||
"cancel": "Annulla",
|
"cancel": "Annulla",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {Carta} other {Carte}}",
|
"card": "{n, plural, =1 {Carta} other {Carte}}",
|
||||||
"categories": "Categorie",
|
"categories": "Categorie",
|
||||||
"category": "Categoria",
|
"category": "Categoria",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Perdita di quota",
|
"elevation-loss": "Perdita di quota",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"email-updated": "Indirizzo email aggiornato",
|
"email-updated": "Indirizzo email aggiornato",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} non ha ancora attività",
|
"empty-activities": "{username} non ha ancora attività",
|
||||||
"empty-bio": "{username} non ha ancora aggiunto una biografia",
|
"empty-bio": "{username} non ha ancora aggiunto una biografia",
|
||||||
"empty-lists": "{username} non ha liste pubbliche",
|
"empty-lists": "{username} non ha liste pubbliche",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Inizia salvando la tua ultima avventura.",
|
"hero_section_1_text_alternative": "Inizia salvando la tua ultima avventura.",
|
||||||
"hero_section_2_text": "Lo sapevi? Non puoi salvare solo i tuoi percorsi. Ci sono molte categorie per tutte le tue avventure.",
|
"hero_section_2_text": "Lo sapevi? Non puoi salvare solo i tuoi percorsi. Ci sono molte categorie per tutte le tue avventure.",
|
||||||
"hiking": "Escursionismo",
|
"hiking": "Escursionismo",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Ungherese",
|
"hungarian": "Ungherese",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Icona",
|
"icon": "Icona",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "by",
|
"by": "by",
|
||||||
"can": "can",
|
"can": "can",
|
||||||
"cancel": "Annuleren",
|
"cancel": "Annuleren",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {kaart} other {kaarten}}",
|
"card": "{n, plural, =1 {kaart} other {kaarten}}",
|
||||||
"categories": "Categorieën",
|
"categories": "Categorieën",
|
||||||
"category": "Categorie",
|
"category": "Categorie",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Elevation Loss",
|
"elevation-loss": "Elevation Loss",
|
||||||
"email": "E-mail",
|
"email": "E-mail",
|
||||||
"email-updated": "Email updated",
|
"email-updated": "Email updated",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} has no activity yet",
|
"empty-activities": "{username} has no activity yet",
|
||||||
"empty-bio": "{username} has not added a bio yet",
|
"empty-bio": "{username} has not added a bio yet",
|
||||||
"empty-lists": "{username} has no public lists",
|
"empty-lists": "{username} has no public lists",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Bewaar je recentste avontuur om aan de slag te gaan.",
|
"hero_section_1_text_alternative": "Bewaar je recentste avontuur om aan de slag te gaan.",
|
||||||
"hero_section_2_text": "Wist je dat…? Je kunt niet alleen wandelroutes opslaan: er zijn ook categorieën voor andere avonturen.",
|
"hero_section_2_text": "Wist je dat…? Je kunt niet alleen wandelroutes opslaan: er zijn ook categorieën voor andere avonturen.",
|
||||||
"hiking": "Hiking",
|
"hiking": "Hiking",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Hongaars",
|
"hungarian": "Hongaars",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Pictogram",
|
"icon": "Pictogram",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "przez",
|
"by": "przez",
|
||||||
"can": "może",
|
"can": "może",
|
||||||
"cancel": "Anuluj",
|
"cancel": "Anuluj",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {Karta} other {Karty}}",
|
"card": "{n, plural, =1 {Karta} other {Karty}}",
|
||||||
"categories": "Kategorie",
|
"categories": "Kategorie",
|
||||||
"category": "Kategoria",
|
"category": "Kategoria",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Strata wysokości",
|
"elevation-loss": "Strata wysokości",
|
||||||
"email": "E-mail",
|
"email": "E-mail",
|
||||||
"email-updated": "Email zaktualizowany",
|
"email-updated": "Email zaktualizowany",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} nie ma jeszcze aktywności",
|
"empty-activities": "{username} nie ma jeszcze aktywności",
|
||||||
"empty-bio": "{username} jeszcze nie dodał biogramu",
|
"empty-bio": "{username} jeszcze nie dodał biogramu",
|
||||||
"empty-lists": "{username} nie ma publicznych list",
|
"empty-lists": "{username} nie ma publicznych list",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Zacznij poprzez zapisanie swojej ostatniej wyprawy.",
|
"hero_section_1_text_alternative": "Zacznij poprzez zapisanie swojej ostatniej wyprawy.",
|
||||||
"hero_section_2_text": "Czy wiesz że, możesz zapisywać nie tylko piesze wycieczki ale także inne kategorie wypraw?",
|
"hero_section_2_text": "Czy wiesz że, możesz zapisywać nie tylko piesze wycieczki ale także inne kategorie wypraw?",
|
||||||
"hiking": "Wędrówka",
|
"hiking": "Wędrówka",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Język węgierski",
|
"hungarian": "Język węgierski",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Ikona",
|
"icon": "Ikona",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "by",
|
"by": "by",
|
||||||
"can": "pode",
|
"can": "pode",
|
||||||
"cancel": "Cancelar",
|
"cancel": "Cancelar",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {Cartão} other {Cartões}}",
|
"card": "{n, plural, =1 {Cartão} other {Cartões}}",
|
||||||
"categories": "Categorias",
|
"categories": "Categorias",
|
||||||
"category": "Categoria",
|
"category": "Categoria",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "Perda de elevação",
|
"elevation-loss": "Perda de elevação",
|
||||||
"email": "Correio eletrónico",
|
"email": "Correio eletrónico",
|
||||||
"email-updated": "Email updated",
|
"email-updated": "Email updated",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} has no activity yet",
|
"empty-activities": "{username} has no activity yet",
|
||||||
"empty-bio": "{username} has not added a bio yet",
|
"empty-bio": "{username} has not added a bio yet",
|
||||||
"empty-lists": "{username} has no public lists",
|
"empty-lists": "{username} has no public lists",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "Comece salvando sua última aventura.",
|
"hero_section_1_text_alternative": "Comece salvando sua última aventura.",
|
||||||
"hero_section_2_text": "Sabias? Você não pode apenas salvá-lo trilhas de caminhada. Há muitas categorias para todas as suas aventuras.",
|
"hero_section_2_text": "Sabias? Você não pode apenas salvá-lo trilhas de caminhada. Há muitas categorias para todas as suas aventuras.",
|
||||||
"hiking": "Montanhismo",
|
"hiking": "Montanhismo",
|
||||||
|
"home": "",
|
||||||
"hungarian": "Húngaro",
|
"hungarian": "Húngaro",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "Ícone",
|
"icon": "Ícone",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
"by": "by",
|
"by": "by",
|
||||||
"can": "可以",
|
"can": "可以",
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
|
"car": "",
|
||||||
"card": "{n, plural, =1 {卡片} other {卡片}}",
|
"card": "{n, plural, =1 {卡片} other {卡片}}",
|
||||||
"categories": "分类",
|
"categories": "分类",
|
||||||
"category": "分类",
|
"category": "分类",
|
||||||
@@ -96,6 +97,7 @@
|
|||||||
"elevation-loss": "下降海拔",
|
"elevation-loss": "下降海拔",
|
||||||
"email": "电子邮箱",
|
"email": "电子邮箱",
|
||||||
"email-updated": "Email updated",
|
"email-updated": "Email updated",
|
||||||
|
"email-verified": "",
|
||||||
"empty-activities": "{username} has no activity yet",
|
"empty-activities": "{username} has no activity yet",
|
||||||
"empty-bio": "{username} has not added a bio yet",
|
"empty-bio": "{username} has not added a bio yet",
|
||||||
"empty-lists": "{username} has no public lists",
|
"empty-lists": "{username} has no public lists",
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
"hero_section_1_text_alternative": "即刻开始规划您最新的冒险。",
|
"hero_section_1_text_alternative": "即刻开始规划您最新的冒险。",
|
||||||
"hero_section_2_text": "你知道吗?这里不仅仅可以收藏你的登山路线,还能为您的所有冒险放到相应的类别里面。",
|
"hero_section_2_text": "你知道吗?这里不仅仅可以收藏你的登山路线,还能为您的所有冒险放到相应的类别里面。",
|
||||||
"hiking": "徒步",
|
"hiking": "徒步",
|
||||||
|
"home": "",
|
||||||
"hungarian": "匈牙利语",
|
"hungarian": "匈牙利语",
|
||||||
"hybrid": "",
|
"hybrid": "",
|
||||||
"icon": "图标",
|
"icon": "图标",
|
||||||
|
|||||||
@@ -1,16 +1,24 @@
|
|||||||
import { env } from '$env/dynamic/public';
|
import { env } from '$env/dynamic/public';
|
||||||
import { UserCreateSchema } from '$lib/models/api/user_schema';
|
import { UserCreateSchema } from '$lib/models/api/user_schema';
|
||||||
import type { User } from '$lib/models/user';
|
import type { User } from '$lib/models/user';
|
||||||
|
import { pb } from '$lib/pocketbase';
|
||||||
import { Collection, create, handleError } from '$lib/util/api_util';
|
import { Collection, create, handleError } from '$lib/util/api_util';
|
||||||
import { json, type RequestEvent } from '@sveltejs/kit';
|
import { json, type RequestEvent } from '@sveltejs/kit';
|
||||||
import { ClientResponseError } from 'pocketbase';
|
import { ClientResponseError } from 'pocketbase';
|
||||||
|
|
||||||
export async function PUT(event: RequestEvent) {
|
export async function PUT(event: RequestEvent) {
|
||||||
|
if (env.PUBLIC_DISABLE_SIGNUP === "true") {
|
||||||
|
throw new ClientResponseError({ status: 401, response: { messgage: "Forbidden" } })
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (env.PUBLIC_DISABLE_SIGNUP === "true") {
|
|
||||||
throw new ClientResponseError({ status: 401, response: { messgage: "Forbidden" } })
|
const data = await event.request.json();
|
||||||
}
|
const safeData = UserCreateSchema.parse(data);
|
||||||
const r = await create<User>(event, UserCreateSchema, Collection.users)
|
|
||||||
|
const r = await pb.collection(Collection.users).create<User>(safeData)
|
||||||
|
|
||||||
|
await pb.collection('users').requestVerification(safeData.email);
|
||||||
|
|
||||||
return json(r);
|
return json(r);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { pb } from "$lib/pocketbase";
|
||||||
|
import { Collection } from "$lib/util/api_util";
|
||||||
|
import { error, type ServerLoad } from "@sveltejs/kit";
|
||||||
|
import { ClientResponseError } from "pocketbase";
|
||||||
|
|
||||||
|
export const load: ServerLoad = async ({ params, locals, url, fetch }) => {
|
||||||
|
if (!params.token) {
|
||||||
|
error(400, "Invalid token")
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await pb.collection(Collection.users).confirmVerification(params.token)
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof ClientResponseError) {
|
||||||
|
error(400, e.message);
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { _ } from "svelte-i18n";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>{$_("email-verified")} | wanderer</title>
|
||||||
|
</svelte:head>
|
||||||
|
<main class="flex justify-center items-start">
|
||||||
|
<div
|
||||||
|
class="max-w-md border border-input-border rounded-xl p-8 flex flex-col justify-center items-center gap-4 w-[28rem] mt-8"
|
||||||
|
>
|
||||||
|
<i class="fa fa-check-circle text-emerald-400 text-7xl"></i>
|
||||||
|
<h4 class="text-xl font-semibold">{$_("email-verified")}</h4>
|
||||||
|
<div class="space-y-6 w-80">
|
||||||
|
<p class="text-center">
|
||||||
|
Thank you, your email was verified. Enjoy using wanderer!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<a class="btn-primary mt-4" href="/">{$_("home")}</a>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
Reference in New Issue
Block a user