refactor(striker-ui-api): simplify DB refresh timestamp function name

main
Tsu-ba-me 2 years ago
parent 7c657dfbd5
commit 180aa54800
  1. 2
      striker-ui-api/src/lib/accessModule.ts
  2. 10
      striker-ui-api/src/routes/file.ts

@ -214,7 +214,7 @@ export {
dbInsertOrUpdateVariable as variable, dbInsertOrUpdateVariable as variable,
dbJobAnvilSyncShared, dbJobAnvilSyncShared,
dbQuery, dbQuery,
dbSubRefreshTimestamp, dbSubRefreshTimestamp as timestamp,
dbWrite, dbWrite,
getAnvilData, getAnvilData,
getLocalHostName, getLocalHostName,

@ -3,7 +3,7 @@ import express from 'express';
import { import {
dbJobAnvilSyncShared, dbJobAnvilSyncShared,
dbQuery, dbQuery,
dbSubRefreshTimestamp, timestamp,
dbWrite, dbWrite,
} from '../lib/accessModule'; } from '../lib/accessModule';
import getFile from '../lib/request_handlers/file/getFile'; import getFile from '../lib/request_handlers/file/getFile';
@ -26,7 +26,7 @@ router
`UPDATE files `UPDATE files
SET SET
file_type = '${FILE_TYPE_DELETED}', file_type = '${FILE_TYPE_DELETED}',
modified_date = '${dbSubRefreshTimestamp()}' modified_date = '${timestamp()}'
WHERE file_uuid = '${fileUUID}';`, WHERE file_uuid = '${fileUUID}';`,
).stdout; ).stdout;
@ -77,7 +77,7 @@ router
UPDATE files UPDATE files
SET SET
file_name = '${fileName}', file_name = '${fileName}',
modified_date = '${dbSubRefreshTimestamp()}' modified_date = '${timestamp()}'
WHERE file_uuid = '${fileUUID}';`; WHERE file_uuid = '${fileUUID}';`;
anvilSyncSharedFunctions.push(() => anvilSyncSharedFunctions.push(() =>
@ -97,7 +97,7 @@ router
UPDATE files UPDATE files
SET SET
file_type = '${fileType}', file_type = '${fileType}',
modified_date = '${dbSubRefreshTimestamp()}' modified_date = '${timestamp()}'
WHERE file_uuid = '${fileUUID}';`; WHERE file_uuid = '${fileUUID}';`;
anvilSyncSharedFunctions.push(() => anvilSyncSharedFunctions.push(() =>
@ -136,7 +136,7 @@ router
UPDATE file_locations UPDATE file_locations
SET SET
file_location_active = '${fileLocationActive}', file_location_active = '${fileLocationActive}',
modified_date = '${dbSubRefreshTimestamp()}' modified_date = '${timestamp()}'
WHERE file_location_uuid = '${fileLocationUUID}';`; WHERE file_location_uuid = '${fileLocationUUID}';`;
const targetHosts = dbQuery( const targetHosts = dbQuery(

Loading…
Cancel
Save