Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
updateUser: default empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
NextFire committed Feb 16, 2024
1 parent 1231cd4 commit 66536b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async function createUser(

// deno-lint-ignore no-explicit-any
async function updateUser(apiToken: string, user: any, groups: SFTPGoGroup[]) {
const public_keys = user.public_keys;
const public_keys = user.public_keys ?? [];
if (!public_keys.includes(PUBKEY)) {
public_keys.push(PUBKEY);
}
Expand Down

0 comments on commit 66536b3

Please sign in to comment.