refactor: use integer primary keys

Closes #1292

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-09-18 20:26:42 +02:00 committed by Yannick Bungers
parent 499f632d8d
commit 2c1e0517ff
17 changed files with 42 additions and 42 deletions

View file

@ -139,9 +139,9 @@ describe('PermissionsService', () => {
// The two users we test with:
const user2 = {} as User;
user2.id = '2';
user2.id = 2;
const user1 = {} as User;
user1.id = '1';
user1.id = 1;
it('should be defined', () => {
expect(service).toBeDefined();
@ -676,9 +676,9 @@ describe('PermissionsService', () => {
const noteWithPreexistingPermissions: Note = { ...note };
noteWithPreexistingPermissions.userPermissions = Promise.resolve([
{
noteId: '',
noteId: 4711,
note: noteWithPreexistingPermissions,
userId: '',
userId: 4711,
user: user,
canEdit: !userPermissionUpdate.canEdit,
},
@ -750,9 +750,9 @@ describe('PermissionsService', () => {
const noteWithUserPermission: Note = { ...note };
noteWithUserPermission.userPermissions = Promise.resolve([
{
noteId: '',
noteId: 4711,
note: noteWithUserPermission,
userId: '',
userId: 4711,
user: user,
canEdit: !userPermissionUpdate.canEdit,
},
@ -788,7 +788,7 @@ describe('PermissionsService', () => {
const noteWithPreexistingPermissions: Note = { ...note };
noteWithPreexistingPermissions.groupPermissions = Promise.resolve([
{
noteId: '',
noteId: 4711,
note: noteWithPreexistingPermissions,
groupId: 0,
group: group,
@ -820,7 +820,7 @@ describe('PermissionsService', () => {
const noteWithPreexistingPermissions: Note = { ...note };
noteWithPreexistingPermissions.groupPermissions = Promise.resolve([
{
noteId: '',
noteId: 4711,
note: noteWithPreexistingPermissions,
groupId: 0,
group: group,
@ -858,7 +858,7 @@ describe('PermissionsService', () => {
const noteWithPreexistingPermissions: Note = { ...note };
noteWithPreexistingPermissions.groupPermissions = Promise.resolve([
{
noteId: '',
noteId: 4711,
note: noteWithPreexistingPermissions,
groupId: 0,
group: group,
@ -867,9 +867,9 @@ describe('PermissionsService', () => {
]);
noteWithPreexistingPermissions.userPermissions = Promise.resolve([
{
noteId: '',
noteId: 4711,
note: noteWithPreexistingPermissions,
userId: '',
userId: 4711,
user: user,
canEdit: !userPermissionUpdate.canEdit,
},