Removed database initialization code and instead used the function defined in db.inc.php

This commit is contained in:
2023-06-25 14:09:30 -05:00
parent df131d2fb5
commit 1c74b82f6e
3 changed files with 19 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
<?php
require_once 'db.inc.php';
function gen_base62_rand_shortlink($len) {
$rand_bytes = random_bytes(intval(($len * 2) / 3));
@@ -29,9 +30,7 @@ function gen_rand_shortlink($len) {
ini_set('display_errors', 1);
$cluster = Cassandra::cluster()->withPersistentSessions(true)->build();
$keyspace = 'glink';
$session = $cluster->connect($keyspace);
$session = init_cass_db();
$url = $_GET["url"];