mirror of
https://github.com/zhigang1992/now-deployment.git
synced 2026-06-14 09:49:12 +08:00
16 lines
351 B
TypeScript
16 lines
351 B
TypeScript
import textInput from '../input/text';
|
|
|
|
export default async function getAuthCode(code?: string) {
|
|
if (isValidAuthCode(code)) {
|
|
return code;
|
|
}
|
|
return textInput({
|
|
label: `- Transfer auth code: `,
|
|
validateValue: isValidAuthCode
|
|
});
|
|
}
|
|
|
|
function isValidAuthCode(code?: string): code is string {
|
|
return !!(code && code.length > 0);
|
|
}
|