fix: add_account.overwrite was not working
Massimo Melina committed
Apr 19, 2024 at 14:02 UTC
0185927ec2deeb5953c259cf100ee61f6d1846ff
1 file changed
+1
-1
src/api.accounts.ts
+1
-1
@@ -50,7 +50,7 @@ export default {
50
async add_account({ overwrite, username, ...rest }) {
51
const existing = getAccount(username)
52
if (existing) {
53
- if (overwrite) return new ApiError(HTTP_CONFLICT)
53
+ if (!overwrite) return new ApiError(HTTP_CONFLICT)
54
await updateAccount(existing, rest)
55
return _.pick(existing, 'username')
56
}