refactor(project): 🗑️ cleanup

master
Xeronith 2023-05-01 14:42:14 +03:30
rodzic dab29fbe95
commit 9df75b259a
1 zmienionych plików z 2 dodań i 6 usunięć

Wyświetl plik

@ -8,17 +8,13 @@ import (
func Initialize(x IDispatcher) error {
// data seed
if !x.IdentityExists(0) {
if !x.IdentityExists(1) {
identity := x.AddIdentityWithCustomId(0, "invalid", "0", false, EMPTY, EMPTY, EMPTY, "invalid@localhost", false, EMPTY, EMPTY, EMPTY, "0", false, EMPTY, EMPTY, EMPTY, EMPTY, NOT_SET, ACL_RESTRICTION_ACCESS_DENIED, NOT_SET, NOT_SET)
x.AddUser(identity.Id(), EMPTY)
}
if !x.IdentityExists(1) {
identity := x.AddIdentityWithCustomId(1, "root", "1", false, EMPTY, EMPTY, EMPTY, "root@localhost", false, EMPTY, EMPTY, EMPTY, "1", true, EMPTY, EMPTY, EMPTY, EMPTY, ACL_PERMISSION_ADMIN, ACL_RESTRICTION_NONE, NOT_SET, NOT_SET)
identity = x.AddIdentityWithCustomId(1, "root", "1", false, EMPTY, EMPTY, EMPTY, "root@localhost", false, EMPTY, EMPTY, EMPTY, "1", true, EMPTY, EMPTY, EMPTY, EMPTY, ACL_PERMISSION_ADMIN, ACL_RESTRICTION_NONE, NOT_SET, NOT_SET)
x.AddUser(identity.Id(), EMPTY)
}
if !x.CategoryTypeExists(0) {
categoryType := x.AddCategoryTypeWithCustomId(0, EMPTY)
_ = x.AddCategoryWithCustomId(0, categoryType.Id(), NOT_SET, EMPTY, EMPTY)
}