mirror of
https://github.com/versia-pub/server.git
synced 2026-01-26 12:16:01 +01:00
fix(config): 🐛 Expand contexts in which the config will autogenerate keys
This commit is contained in:
parent
14855b9dfe
commit
9840b5e10f
|
|
@ -136,12 +136,12 @@ export const filePathString = z
|
|||
|
||||
export const keyPair = z
|
||||
.strictObject({
|
||||
public: sensitiveString,
|
||||
private: sensitiveString,
|
||||
public: sensitiveString.optional(),
|
||||
private: sensitiveString.optional(),
|
||||
})
|
||||
.optional()
|
||||
.transform(async (k, ctx) => {
|
||||
if (!k) {
|
||||
if (!(k?.public && k?.private)) {
|
||||
const keys = await crypto.subtle.generateKey("Ed25519", true, [
|
||||
"sign",
|
||||
"verify",
|
||||
|
|
|
|||
Loading…
Reference in a new issue