Monorepo for Tangled tangled.org

use epoch time in pubkeys table too

Changed files
+6 -2
appview
+6 -2
appview/db/pubkeys.go
··· 32 32 33 33 for rows.Next() { 34 34 var publicKey PublicKey 35 - if err := rows.Scan(&publicKey.Key, &publicKey.Name, &publicKey.DID, &publicKey.Created); err != nil { 35 + var createdAt *int64 36 + if err := rows.Scan(&publicKey.Key, &publicKey.Name, &publicKey.DID, &createdAt); err != nil { 36 37 return nil, err 37 38 } 39 + publicKey.Created = time.Unix(*createdAt, 0) 38 40 keys = append(keys, publicKey) 39 41 } 40 42 ··· 56 58 57 59 for rows.Next() { 58 60 var publicKey PublicKey 59 - if err := rows.Scan(&publicKey.DID, &publicKey.Key, &publicKey.Name, &publicKey.Created); err != nil { 61 + var createdAt *int64 62 + if err := rows.Scan(&publicKey.DID, &publicKey.Key, &publicKey.Name, &createdAt); err != nil { 60 63 return nil, err 61 64 } 65 + publicKey.Created = time.Unix(*createdAt, 0) 62 66 keys = append(keys, publicKey) 63 67 } 64 68