Fix bugs.

This commit is contained in:
Kaitlyn Parkhurst 2021-07-11 12:33:31 -07:00
parent d6672fe1a8
commit 7b1ed50e60
4 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ CREATE TABLE auth_password (
CREATE TABLE auth_token (
id serial PRIMARY KEY,
person_id int not null unique references person(id),
person_id int not null references person(id),
token text not null,
created_at timestamptz not null default current_timestamp
);

View file

@ -112,7 +112,7 @@ sub startup ($self) {
filepath => $filepath,
filename => $c->param('filename'),
);
});
})->name( 'secure_file' );
# Send requests for / to the dashboard.
$auth->get('/')->to(cb => sub ($c) {

View file

@ -139,7 +139,7 @@ sub register ( $self, $app, $config ) {
Mojo::File->new( "$etc_path/Nebula.plist" )->copy_to( $dir );
# my $outfile = $job->app->filepath_for( nebula => $net_id, "${domain}_macos_intel.tgz" )VC
my $outfile = $job->app->download_dir . "${domain}_macos.tgz";
my $outfile = $job->app->files_dir . "/secure_download/${domain}_macos.tgz";
my $command = [qw( tar -C ), $tempdir, '-czf', $outfile, 'nebula' ];
run3( $command );

View file

@ -30,7 +30,7 @@
adoption.</p>
<pre>
curl -O -H 'X-Auth: [% $c.stash.person.create_auth_token %]' [% $c.url_for( '/download/' ~ $pending ).to_abs %]
curl -O -H 'X-Auth: [% $c.stash.person.create_auth_token %]' [% $c.url_for( 'secure_file', 'filename', $pending ).to_abs %]
tar -xzf [% $pending %]
cd nebula