fix(GRO-639): replace raw SQL ANY() with Drizzle inArray
- Replace raw sql template literal with Drizzle inArray for reminderLogs query (P1 fix per CTO review of PR #306) - inArray is already used in payment.ts and portal.ts Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
# The current version of the config schema
|
||||||
|
version: 1
|
||||||
|
# What protocol to use when performing git operations. Supported values: ssh, https
|
||||||
|
git_protocol: https
|
||||||
|
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
|
||||||
|
editor:
|
||||||
|
# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
|
||||||
|
prompt: enabled
|
||||||
|
# Preference for editor-based interactive prompting. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
|
||||||
|
prefer_editor_prompt: disabled
|
||||||
|
# A pager program to send command output to, e.g. "less". If blank, will refer to environment. Set the value to "cat" to disable the pager.
|
||||||
|
pager:
|
||||||
|
# Aliases allow you to create nicknames for gh commands
|
||||||
|
aliases:
|
||||||
|
co: pr checkout
|
||||||
|
# The path to a unix socket through which to send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
|
||||||
|
http_unix_socket:
|
||||||
|
# What web browser gh should use when opening URLs. If blank, will refer to environment.
|
||||||
|
browser:
|
||||||
|
# Whether to display labels using their RGB hex color codes in terminals that support truecolor. Supported values: enabled, disabled
|
||||||
|
color_labels: disabled
|
||||||
|
# Whether customizable, 4-bit accessible colors should be used. Supported values: enabled, disabled
|
||||||
|
accessible_colors: disabled
|
||||||
|
# Whether an accessible prompter should be used. Supported values: enabled, disabled
|
||||||
|
accessible_prompter: disabled
|
||||||
|
# Whether to use a animated spinner as a progress indicator. If disabled, a textual progress indicator is used instead. Supported values: enabled, disabled
|
||||||
|
spinner: enabled
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
github.com:
|
||||||
|
users:
|
||||||
|
groombook-engineer[bot]:
|
||||||
|
oauth_token: ghs_znRlNnhuSsNZp0GejabxpkSUqXC9vt27yl3K
|
||||||
|
user: groombook-engineer[bot]
|
||||||
|
oauth_token: ghs_znRlNnhuSsNZp0GejabxpkSUqXC9vt27yl3K
|
||||||
@@ -5,8 +5,8 @@ import {
|
|||||||
eq,
|
eq,
|
||||||
getDb,
|
getDb,
|
||||||
gte,
|
gte,
|
||||||
|
inArray,
|
||||||
lt,
|
lt,
|
||||||
sql,
|
|
||||||
appointments,
|
appointments,
|
||||||
clients,
|
clients,
|
||||||
pets,
|
pets,
|
||||||
@@ -77,9 +77,7 @@ export async function runReminderCheck(): Promise<void> {
|
|||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
eq(reminderLogs.reminderType, window.label),
|
eq(reminderLogs.reminderType, window.label),
|
||||||
appointmentIds.length === 1
|
inArray(reminderLogs.appointmentId, appointmentIds)
|
||||||
? eq(reminderLogs.appointmentId, appointmentIds[0]!)
|
|
||||||
: sql`${reminderLogs.appointmentId} = ANY(${appointmentIds})`
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
).map((r) => r.appointmentId)
|
).map((r) => r.appointmentId)
|
||||||
|
|||||||
Submodule
+1
Submodule infra-repo added at ff42966751
Reference in New Issue
Block a user