Skip to content

Commit

Permalink
chore : fixed rebase mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
BichraiX committed Jul 11, 2024
1 parent b256cf5 commit f3a3753
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
14 changes: 7 additions & 7 deletions packages/matrix-client-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
'/_matrix/client/v3/register/email/requestToken': badMethod,
'/_matrix/client/v3/register/email/submitToken':
SubmitTokenEmail(this),
'/_matrix/client/v3/user/:roomId/timestamp_to_event':
'/_matrix/client/v3/rooms/:roomId/timestamp_to_event':
getTimestampToEvent(this)
}
this.api.post = {
Expand All @@ -169,14 +169,14 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
'/_matrix/client/v3/user/:userId/rooms/:roomId/tags': badMethod,
'/_matrix/client/v3/joined_rooms': badMethod,
'/_matrix/client/v3/directory/list/room/:roomId': badMethod,
'/_matrix/client/v3/rooms/{roomId}/aliases': badMethod,
'/_matrix/client/v3/rooms/:roomId/aliases': badMethod,
'/_matrix/client/v3/account/password/email/requestToken':
RequestTokenPasswordEmail(this),
'/_matrix/client/v3/register/email/requestToken':
RequestTokenEmail(this),
'/_matrix/client/v3/register/email/submitToken':
SubmitTokenEmail(this),
'/_matrix/client/v3/user/:roomId/timestamp_to_event': badMethod
'/_matrix/client/v3/rooms/:roomId/timestamp_to_event': badMethod
}
this.api.put = {
'/_matrix/client/v3/account/whoami': badMethod,
Expand All @@ -201,11 +201,11 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
'/_matrix/client/v3/joined_rooms': badMethod,
'/_matrix/client/v3/directory/list/room/:roomId':
setRoomVisibility(this),
'/_matrix/client/v3/rooms/{roomId}/aliases': badMethod,
'/_matrix/client/v3/rooms/:roomId/aliases': badMethod,
'/_matrix/client/v3/account/password/email/requestToken': badMethod,
'/_matrix/client/v3/register/email/requestToken': badMethod,
'/_matrix/client/v3/register/email/submitToken': badMethod,
'/_matrix/client/v3/user/:roomId/timestamp_to_event': badMethod
'/_matrix/client/v3/rooms/:roomId/timestamp_to_event': badMethod
}
this.api.delete = {
'/_matrix/client/v3/account/whoami': badMethod,
Expand All @@ -221,11 +221,11 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
removeUserRoomTag(this),
'/_matrix/client/v3/joined_rooms': badMethod,
'/_matrix/client/v3/directory/list/room/:roomId': badMethod,
'/_matrix/client/v3/rooms/{roomId}/aliases': badMethod,
'/_matrix/client/v3/rooms/:roomId/aliases': badMethod,
'/_matrix/client/v3/account/password/email/requestToken': badMethod,
'/_matrix/client/v3/register/email/requestToken': badMethod,
'/_matrix/client/v3/register/email/submitToken': badMethod,
'/_matrix/client/v3/user/:roomId/timestamp_to_event': badMethod
'/_matrix/client/v3/rooms/:roomId/timestamp_to_event': badMethod
}
resolve(true)
})
Expand Down
6 changes: 3 additions & 3 deletions packages/matrix-client-server/src/matrixDb/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type GetMinMax2 = (
order?: string
) => Promise<DbGetResult>
type GetMinMaxJoin2 = (
tables: Array<Collections>,
tables: Collections[],
targetField: string,
fields: string[],
filterFields1: Record<string, string | number | Array<string | number>>,
Expand Down Expand Up @@ -236,7 +236,7 @@ class MatrixDBmodified implements MatrixDBmodifiedBackend {
)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getMaxWhereEqualAndLower(
table: Collections,
targetField: string,
Expand All @@ -255,7 +255,7 @@ class MatrixDBmodified implements MatrixDBmodifiedBackend {
)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getMinWhereEqualAndHigher(
table: Collections,
targetField: string,
Expand Down
4 changes: 2 additions & 2 deletions packages/matrix-client-server/src/rooms/roomId/getEventId.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MatrixClientServer from '../..'
import type MatrixClientServer from '../..'
import { epoch, errMsg, send, type expressAppHandler } from '@twake/utils'
import { type ClientEvent } from '../../types'

Expand Down Expand Up @@ -38,7 +38,7 @@ const GetEventId = (ClientServer: MatrixClientServer): expressAppHandler => {
return
}
// Check if the user has permission to retrieve this event
const userId = data.sub as string
const userId = data.sub
ClientServer.matrixDb
.getMaxWhereEqualAndLowerJoin(
['room_memberships', 'events'],
Expand Down
16 changes: 8 additions & 8 deletions packages/matrix-identity-server/src/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type Get2<T> = (
order?: string
) => Promise<DbGetResult>
type GetJoin<T> = (
tables: Array<T>,
tables: T[],
fields: string[],
filterFields: Record<string, string | number | Array<string | number>>,
joinFields: Record<string, string>,
Expand All @@ -122,7 +122,7 @@ type GetMinMax2<T> = (
order?: string
) => Promise<DbGetResult>
type GetMinMaxJoin2<T> = (
tables: Array<T>,
tables: T[],
targetField: string,
fields: string[],
filterFields1: Record<string, string | number | Array<string | number>>,
Expand Down Expand Up @@ -339,7 +339,7 @@ class IdentityServerDb<T extends string = never>
return this.db.getJoin(table, fields, filterFields, joinFields, order)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getWhereEqualOrDifferent(
table: Collections | T,
fields: string[],
Expand All @@ -356,7 +356,7 @@ class IdentityServerDb<T extends string = never>
)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getWhereEqualAndHigher(
table: Collections | T,
fields: string[],
Expand All @@ -373,7 +373,7 @@ class IdentityServerDb<T extends string = never>
)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getMaxWhereEqual(
table: Collections | T,
targetField: string,
Expand All @@ -390,7 +390,7 @@ class IdentityServerDb<T extends string = never>
)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getMaxWhereEqualAndLower(
table: Collections | T,
targetField: string,
Expand All @@ -409,7 +409,7 @@ class IdentityServerDb<T extends string = never>
)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getMinWhereEqualAndHigher(
table: Collections | T,
targetField: string,
Expand All @@ -428,7 +428,7 @@ class IdentityServerDb<T extends string = never>
)
}

//eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/promise-function-async
getMaxWhereEqualAndLowerJoin(
tables: Array<T | Collections>,
targetField: string,
Expand Down
20 changes: 10 additions & 10 deletions packages/matrix-identity-server/src/db/sql/pg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class Pg<T extends string> extends SQL<T> implements IdDbBackend<T> {
}

_get(
tables: Array<T>,
tables: T[],
fields?: string[],
op1?: string,
filterFields1?: Record<string, string | number | Array<string | number>>,
Expand Down Expand Up @@ -296,13 +296,13 @@ class Pg<T extends string> extends SQL<T> implements IdDbBackend<T> {
? buildCondition(op3, filterFields3)
: ''

condition += condition1 != '' ? 'WHERE ' + condition1 : ''
condition += condition1 !== '' ? 'WHERE ' + condition1 : ''
condition +=
condition2 != ''
condition2 !== ''
? (condition ? ` ${linkop1} ` : 'WHERE ') + condition2
: ''
condition +=
condition3 != ''
condition3 !== ''
? (condition ? ` ${linkop2} ` : 'WHERE ') + condition3
: ''

Expand Down Expand Up @@ -358,7 +358,7 @@ class Pg<T extends string> extends SQL<T> implements IdDbBackend<T> {
}

getJoin(
tables: Array<T>,
tables: T[],
fields?: string[],
filterFields?: Record<string, string | number | Array<string | number>>,
joinFields?: Record<string, string>,
Expand Down Expand Up @@ -450,7 +450,7 @@ class Pg<T extends string> extends SQL<T> implements IdDbBackend<T> {

_getMinMax(
minmax: 'MIN' | 'MAX',
tables: Array<T>,
tables: T[],
targetField: string,
fields?: string[],
op1?: string,
Expand Down Expand Up @@ -480,7 +480,7 @@ class Pg<T extends string> extends SQL<T> implements IdDbBackend<T> {
return field
})
}
let targetFieldAlias: string = targetField.replace(/\./g, '_')
const targetFieldAlias: string = targetField.replace(/\./g, '_')

let index = 0

Expand Down Expand Up @@ -530,9 +530,9 @@ class Pg<T extends string> extends SQL<T> implements IdDbBackend<T> {
? buildCondition(op2, filterFields2)
: ''

condition += condition1 != '' ? 'WHERE ' + condition1 : ''
condition += condition1 !== '' ? 'WHERE ' + condition1 : ''
condition +=
condition2 != ''
condition2 !== ''
? (condition ? ` ${linkop} ` : 'WHERE ') + condition2
: ''

Expand Down Expand Up @@ -638,7 +638,7 @@ class Pg<T extends string> extends SQL<T> implements IdDbBackend<T> {
}

getMaxWhereEqualAndLowerJoin(
tables: Array<T>,
tables: T[],
targetField: string,
fields: string[],
filterFields1?: Record<string, string | number | Array<string | number>>,
Expand Down
20 changes: 10 additions & 10 deletions packages/matrix-identity-server/src/db/sql/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class SQLite<T extends string> extends SQL<T> implements IdDbBackend<T> {
}

_get(
tables: Array<T>,
tables: T[],
fields?: string[],
op1?: string,
filterFields1?: Record<string, string | number | Array<string | number>>,
Expand Down Expand Up @@ -285,13 +285,13 @@ class SQLite<T extends string> extends SQL<T> implements IdDbBackend<T> {
? buildCondition(op3, filterFields3)
: ''

condition += condition1 != '' ? 'WHERE ' + condition1 : ''
condition += condition1 !== '' ? 'WHERE ' + condition1 : ''
condition +=
condition2 != ''
condition2 !== ''
? (condition ? ` ${linkop1} ` : 'WHERE ') + condition2
: ''
condition +=
condition3 != ''
condition3 !== ''
? (condition ? ` ${linkop2} ` : 'WHERE ') + condition3
: ''

Expand Down Expand Up @@ -359,7 +359,7 @@ class SQLite<T extends string> extends SQL<T> implements IdDbBackend<T> {
}

getJoin(
tables: Array<T>,
tables: T[],
fields?: string[],
filterFields?: Record<string, string | number | Array<string | number>>,
joinFields?: Record<string, string>,
Expand Down Expand Up @@ -451,7 +451,7 @@ class SQLite<T extends string> extends SQL<T> implements IdDbBackend<T> {

_getMinMax(
minmax: 'MIN' | 'MAX',
tables: Array<T>,
tables: T[],
targetField: string,
fields?: string[],
op1?: string,
Expand Down Expand Up @@ -481,7 +481,7 @@ class SQLite<T extends string> extends SQL<T> implements IdDbBackend<T> {
return field
})
}
let targetFieldAlias: string = targetField.replace(/\./g, '_')
const targetFieldAlias: string = targetField.replace(/\./g, '_')

let index: number = 0

Expand Down Expand Up @@ -531,9 +531,9 @@ class SQLite<T extends string> extends SQL<T> implements IdDbBackend<T> {
? buildCondition(op2, filterFields2)
: ''

condition += condition1 != '' ? 'WHERE ' + condition1 : ''
condition += condition1 !== '' ? 'WHERE ' + condition1 : ''
condition +=
condition2 != ''
condition2 !== ''
? (condition ? ` ${linkop} ` : 'WHERE ') + condition2
: ''

Expand Down Expand Up @@ -651,7 +651,7 @@ class SQLite<T extends string> extends SQL<T> implements IdDbBackend<T> {
}

getMaxWhereEqualAndLowerJoin(
tables: Array<T>,
tables: T[],
targetField: string,
fields: string[],
filterFields1?: Record<string, string | number | Array<string | number>>,
Expand Down

0 comments on commit f3a3753

Please sign in to comment.