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() }