Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: resource create time format for mysql (#3381)

wzc90deb1deb14c2c
diff --git a/store/db/mysql/resource.go b/store/db/mysql/resource.go
index 070584aed..689e846f1 100644
--- a/store/db/mysql/resource.go
+++ b/store/db/mysql/resource.go
@@ -70,7 +70,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st
where, args = append(where, "`storage_type` = ?"), append(args, find.StorageType.String())
}
- fields := []string{"`id`", "`uid`", "`filename`", "`type`", "`size`", "`creator_id`", "`created_ts`", "`updated_ts`", "`memo_id`", "`storage_type`", "`reference`", "`payload`"}
+ fields := []string{"`id`", "`uid`", "`filename`", "`type`", "`size`", "`creator_id`", "UNIX_TIMESTAMP(`created_ts`)", "UNIX_TIMESTAMP(`updated_ts`)", "`memo_id`", "`storage_type`", "`reference`", "`payload`"}
if find.GetBlob {
fields = append(fields, "`blob`")
}