From 563cc6411eed29b1e143fe57b3724eb13cc64861 Mon Sep 17 00:00:00 2001 From: Anselm McClain Date: Mon, 11 Nov 2024 12:12:45 -0800 Subject: [PATCH] Tweak --- .../io/xh/hoist/admin/JsonBlobAdminController.groovy | 4 +++- .../services/io/xh/hoist/jsonblob/JsonBlobService.groovy | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/io/xh/hoist/admin/JsonBlobAdminController.groovy b/grails-app/controllers/io/xh/hoist/admin/JsonBlobAdminController.groovy index aa57fdc4..8450ef02 100644 --- a/grails-app/controllers/io/xh/hoist/admin/JsonBlobAdminController.groovy +++ b/grails-app/controllers/io/xh/hoist/admin/JsonBlobAdminController.groovy @@ -10,6 +10,8 @@ package io.xh.hoist.admin import io.xh.hoist.jsonblob.JsonBlob import io.xh.hoist.security.Access +import static java.lang.System.currentTimeMillis + @Access(['HOIST_ADMIN_READER']) class JsonBlobAdminController extends AdminRestController { static restTarget = JsonBlob @@ -26,7 +28,7 @@ class JsonBlobAdminController extends AdminRestController { protected void preprocessSubmit(Map submit) { // Note explicit true/false check to distinguish from undefined if (submit.archived == true) { - submit.archivedDate = new Date().getTime() + submit.archivedDate = currentTimeMillis() } else if (submit.archived == false) { submit.archivedDate = 0 } diff --git a/grails-app/services/io/xh/hoist/jsonblob/JsonBlobService.groovy b/grails-app/services/io/xh/hoist/jsonblob/JsonBlobService.groovy index ca02e275..90718309 100644 --- a/grails-app/services/io/xh/hoist/jsonblob/JsonBlobService.groovy +++ b/grails-app/services/io/xh/hoist/jsonblob/JsonBlobService.groovy @@ -63,7 +63,6 @@ class JsonBlobService extends BaseService implements DataBinder { JsonBlob archive(String token, String username = username) { def blob = get(token, username) blob.archivedDate = currentTimeMillis() - blob.lastUpdatedBy = authUsername blob.save() }