Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit d326564

Browse files
shargongsingh93
authored andcommitted
I think its bad (#446)
* Fix fail error * Order by name in category list The category filter in gameboard aren't ordered alphabetically * Autofocus in team name * Fail * Fix Fail autofocus * Fix error with autofocus * Not very good For security reasons, I think it's not very good insert the admin id by default at session table * Update SessionTest.php
1 parent 0b7ca09 commit d326564

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/models/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private static function sessionFromRow(Map<string, string> $row): Session {
111111
): Awaitable<void> {
112112
$db = await self::genDb();
113113
await $db->queryf(
114-
'INSERT INTO sessions (cookie, data, created_ts, last_access_ts, team_id, last_page_access) VALUES (%s, %s, NOW(), NOW(), 1, %s)',
114+
'INSERT INTO sessions (cookie, data, created_ts, last_access_ts, team_id, last_page_access) VALUES (%s, %s, NOW(), NOW(), 0, %s)',
115115
$cookie,
116116
$data,
117117
Router::getRequestedPage(),

tests/models/SessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public function testCreate(): void {
2222
$this->assertEquals(2, $a->getId());
2323
$this->assertEquals('cookie2', $a->getCookie());
2424
$this->assertEquals('data2', $a->getData());
25-
$this->assertEquals(1, $a->getTeamId());
25+
$this->assertEquals(0, $a->getTeamId());
2626
}
2727
}

0 commit comments

Comments
 (0)