Merge remote-tracking branch 'github/main'
This commit is contained in:
commit
5ff0425309
8 changed files with 489 additions and 504 deletions
|
@ -126,6 +126,7 @@ privacy policy. For the sake of this readme, we assume that you are using the
|
|||
The travelynx container does not contain a mail server, so it needs a
|
||||
separate SMTP server to send mail. It does not receive mail.
|
||||
* create local/imprint.html.ep and enter imprint as well as privacy policy data.
|
||||
* create local/terms-of-service.html.ep and enter your terms of service.
|
||||
* Configure your web server to reverse-provy requests to the travelynx
|
||||
instance. See `examples/nginx-site` for an nginx config.
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2354,6 +2354,7 @@ sub startup {
|
|||
$r->get('/changelog')->to('static#changelog');
|
||||
$r->get('/impressum')->to('static#imprint');
|
||||
$r->get('/imprint')->to('static#imprint');
|
||||
$r->get('/tos')->to('static#tos');
|
||||
$r->get('/legend')->to('static#legend');
|
||||
$r->get('/offline.html')->to('static#offline');
|
||||
$r->get('/api/v1/:user_action/:token')->to('api#get_v1');
|
||||
|
|
|
@ -46,6 +46,7 @@ sub send_registration_mail {
|
|||
|
||||
my $ua = $self->req->headers->user_agent;
|
||||
my $reg_url = $self->url_for('reg')->to_abs->scheme('https');
|
||||
my $tos_url = $self->url_for('tos')->to_abs->scheme('https');
|
||||
my $imprint_url = $self->url_for('impressum')->to_abs->scheme('https');
|
||||
|
||||
my $body = "Hallo!\n\n";
|
||||
|
@ -54,7 +55,8 @@ sub send_registration_mail {
|
|||
$body
|
||||
.= "Falls die Registrierung von dir ausging, kannst du den Account unter\n";
|
||||
$body .= "${reg_url}/${user_id}/${token}\n";
|
||||
$body .= "freischalten.\n\n";
|
||||
$body .= "freischalten.\n";
|
||||
$body .= "Beachte dabei die Nutzungsbedingungen: ${tos_url}\n\n";
|
||||
$body
|
||||
.= "Falls nicht, ignoriere diese Mail bitte. Nach etwa 48 Stunden wird deine\n";
|
||||
$body
|
||||
|
|
|
@ -206,7 +206,9 @@ sub travel_v1 {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( not $hafas and not $self->stations->search($from_station, iris => 1) ) {
|
||||
if ( not $hafas
|
||||
and not $self->stations->search( $from_station, backend_id => 1 ) )
|
||||
{
|
||||
$self->render(
|
||||
json => {
|
||||
success => \0,
|
||||
|
@ -221,7 +223,7 @@ sub travel_v1 {
|
|||
|
||||
if ( $to_station
|
||||
and not $hafas
|
||||
and not $self->stations->search($to_station, iris => 1) )
|
||||
and not $self->stations->search( $to_station, backend_id => 1 ) )
|
||||
{
|
||||
$self->render(
|
||||
json => {
|
||||
|
@ -528,8 +530,9 @@ sub import_v1 {
|
|||
$payload->{toStation}{realTime}
|
||||
// $payload->{toStation}{scheduledTime}
|
||||
),
|
||||
comment => sanitize( q{}, $payload->{comment} ),
|
||||
lax => $payload->{lax} ? 1 : 0,
|
||||
comment => sanitize( q{}, $payload->{comment} ),
|
||||
lax => $payload->{lax} ? 1 : 0,
|
||||
backend_id => 1,
|
||||
);
|
||||
|
||||
if ( $payload->{intermediateStops}
|
||||
|
|
|
@ -35,4 +35,10 @@ sub offline {
|
|||
$self->render('offline');
|
||||
}
|
||||
|
||||
sub tos {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->render('terms-of-service');
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -73,6 +73,11 @@
|
|||
<label for="password">Passwort</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 m12 l12">
|
||||
Mit der Anmeldung stimmst du den <a href="/tos">Nutzungsbedingdungen</a> zu.
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s3 m3 l3">
|
||||
</div>
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
<label for="password2">Passwort wiederholen</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 m12 l12">
|
||||
Mit deiner Registrierung stimmst du den <a href="/tos">Nutzungsbedingdungen</a> zu.
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s3 m3 l3">
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue