fix: update template updated_at value (#2729)

* fix: update template updated_at value

* use Go time for all updated_at updates
This commit is contained in:
Abhineet Jain
2022-06-30 12:14:51 +00:00
committed by GitHub
parent 7df5827767
commit 9df6bc7ba1
9 changed files with 51 additions and 28 deletions
+2
View File
@@ -282,6 +282,7 @@ func (api *API) workspaceAgentListen(rw http.ResponseWriter, r *http.Request) {
FirstConnectedAt: firstConnectedAt,
LastConnectedAt: lastConnectedAt,
DisconnectedAt: disconnectedAt,
UpdatedAt: database.Now(),
})
if err != nil {
return err
@@ -491,6 +492,7 @@ func (api *API) postWorkspaceAgentKeys(rw http.ResponseWriter, r *http.Request)
ID: workspaceAgent.ID,
WireguardNodePublicKey: dbtypes.NodePublic(keys.Public),
WireguardDiscoPublicKey: dbtypes.DiscoPublic(keys.Disco),
UpdatedAt: database.Now(),
})
if err != nil {
httpapi.Write(rw, http.StatusInternalServerError, httpapi.Response{