Keep password on save
This commit is contained in:
parent
e728ee5384
commit
38e96f2404
|
@ -4,6 +4,7 @@ import {
|
||||||
DocumentType,
|
DocumentType,
|
||||||
OAuth2Config,
|
OAuth2Config,
|
||||||
OAuth2Configs,
|
OAuth2Configs,
|
||||||
|
PASSWORD_REPLACEMENT,
|
||||||
SEPARATOR,
|
SEPARATOR,
|
||||||
VirtualDocumentType,
|
VirtualDocumentType,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
@ -70,6 +71,10 @@ export async function update(config: OAuth2Config): Promise<OAuth2Config> {
|
||||||
|
|
||||||
doc.configs[config.id] = {
|
doc.configs[config.id] = {
|
||||||
...config,
|
...config,
|
||||||
|
clientSecret:
|
||||||
|
config.clientSecret === PASSWORD_REPLACEMENT
|
||||||
|
? doc.configs[config.id].clientSecret
|
||||||
|
: config.clientSecret,
|
||||||
}
|
}
|
||||||
|
|
||||||
await db.put(doc)
|
await db.put(doc)
|
||||||
|
|
Loading…
Reference in New Issue