Commit 96c992bb authored by ZeMKI's avatar ZeMKI
Browse files

Various Bugfixes

parent c93a9a0e
......@@ -6,26 +6,23 @@ use App\PublicInterviewUrl;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Spatie\WebhookServer\WebhookCall;
class PruneInterviewPublicUrl extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'pruneurls';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Delete not used urls older than 48h';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
......@@ -35,23 +32,25 @@ class PruneInterviewPublicUrl extends Command
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$urls = PublicInterviewUrl::where('created_at', '<=', Carbon::now()->subDays(14))->whereNull('submitted_at')->get();
$countUrls = $urls->count();
foreach($urls as $url)
foreach ($urls as $url)
{
$delete_shorturl = DB::table('art_urls')
->where('url','like', '%'.$url->id)
->where('url', 'like', '%' . $url->id)
->delete();
$url->delete();
}
$this->info($countUrls." url(s) deleted.");
WebhookCall::create()
->url('https://chat.zemki.uni-bremen.de/hooks/pggPQhGehrPiRSb2S/3xJ2bPWfYk2pqBBhtGGkgb3Q2JMGvH4DKaPdTANSTdZCtfxk')
->payload(['text' => $countUrls . " url(s) deleted on Mesort."])
->useSecret('pggPQhGehrPiRSb2S/3xJ2bPWfYk2pqBBhtGGkgb3Q2JMGvH4DKaPdTANSTdZCtfxk')
->dispatch();
$this->info($countUrls . " url(s) deleted.");
}
}
......@@ -17,11 +17,6 @@
height: calc(100vh - 56px);
}
.q-sort{
display: grid;
grid-template-columns: 120px;
grid-template-rows: 120px;
}
.vue-select-fix-width{
......
......@@ -27,14 +27,7 @@
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hidden">
@csrf
</form>
<svg class="pl-2 mb-2 font-medium leading-tight text-3xl fill-current text-gray-100" version="1.1"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129"
enable-background="new 0 0 129 129">
<g>
<path
d="m121.3,34.6c-1.6-1.6-4.2-1.6-5.8,0l-51,51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8,0-1.6,1.6-1.6,4.2 0,5.8l53.9,53.9c0.8,0.8 1.8,1.2 2.9,1.2 1,0 2.1-0.4 2.9-1.2l53.9-53.9c1.7-1.6 1.7-4.2 0.1-5.8z"/>
</g>
</svg>
</button>
<div id="dropdownLogout"
class="bg-gray-900 rounded shadow-md absolute mt-8 top-0 right-0 min-w-full overflow-auto z-30 logoutdropdown-content hidden"
......
......@@ -38,7 +38,7 @@
?>;
</script>
<!-- page specific styles -->
<!-- page specific scripts -->
@yield('pagespecificstyles')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment