forked from FoundKeyGang/FoundKey
parent
b14f3e8cdc
commit
9a085e9d42
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ export async function getNote(noteId: Note['id'], me: { id: User['id'] } | null)
|
||||||
* Get user for API processing
|
* Get user for API processing
|
||||||
*/
|
*/
|
||||||
export async function getUser(userId: User['id'], includeSuspended = false) {
|
export async function getUser(userId: User['id'], includeSuspended = false) {
|
||||||
const user = await Users.findOneBy(
|
const user = await Users.findOneBy({
|
||||||
id: userId,
|
id: userId,
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
isSuspended: !includeSuspended,
|
isSuspended: !includeSuspended,
|
||||||
|
@ -47,7 +47,7 @@ export async function getUser(userId: User['id'], includeSuspended = false) {
|
||||||
* Get remote user for API processing
|
* Get remote user for API processing
|
||||||
*/
|
*/
|
||||||
export async function getRemoteUser(userId: User['id'], includeSuspended = false) {
|
export async function getRemoteUser(userId: User['id'], includeSuspended = false) {
|
||||||
const user = await Users.findOneBy(
|
const user = await Users.findOneBy({
|
||||||
id: userId,
|
id: userId,
|
||||||
host: Not(IsNull()),
|
host: Not(IsNull()),
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
|
@ -65,7 +65,7 @@ export async function getRemoteUser(userId: User['id'], includeSuspended = false
|
||||||
* Get local user for API processing
|
* Get local user for API processing
|
||||||
*/
|
*/
|
||||||
export async function getLocalUser(userId: User['id'], includeSuspended = false) {
|
export async function getLocalUser(userId: User['id'], includeSuspended = false) {
|
||||||
const user = await Users.findOneBy(
|
const user = await Users.findOneBy({
|
||||||
id: userId,
|
id: userId,
|
||||||
host: IsNull(),
|
host: IsNull(),
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
|
|
Loading…
Reference in a new issue