mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 20:47:02 +03:00
Fix boolean comparison, Add log table to schema visual
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
[vipUsers](###vipUsers)
|
||||
[sponsorTimes](###sponsorTimes)
|
||||
[userNames](###userNames)
|
||||
[userNameLogs](###userNameLogs)
|
||||
[categoryVotes](###categoryVotes)
|
||||
[lockCategories](###lockCategories)
|
||||
[warnings](###warnings)
|
||||
@@ -61,6 +62,16 @@
|
||||
| -- | :--: |
|
||||
| userNames_userID | userID |
|
||||
|
||||
### userNameLogs
|
||||
|
||||
| Name | Type | |
|
||||
| -- | :--: | -- |
|
||||
| userID | TEXT | not null |
|
||||
| newUserName | TEXT | not null |
|
||||
| oldUserName | TEXT | not null |
|
||||
| updatedByAdmin | BOOLEAN | not null |
|
||||
| updatedAt | INTEGER | not null |
|
||||
|
||||
### categoryVotes
|
||||
|
||||
| Name | Type | |
|
||||
|
||||
@@ -59,7 +59,7 @@ async function testUserNameChangelog(userID: string, newUserName: string, oldUse
|
||||
return done(`UserID '${userID}' incorrect log on oldUserName: ${oldUserName} !== ${log.oldUserName}`);
|
||||
}
|
||||
|
||||
if (+byAdmin !== log.updatedByAdmin) {
|
||||
if (byAdmin !== Boolean(log.updatedByAdmin)) {
|
||||
return done(`UserID '${userID}' incorrect log on updatedByAdmin: ${byAdmin} !== ${log.updatedByAdmin}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user