mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
refactor: improve async handling
This commit is contained in:
committed by
Carlos Valente
parent
c65761448d
commit
891bda6661
@@ -114,18 +114,13 @@ async function getDeviceCodes(clientSecret: ClientSecret): Promise<CodesResponse
|
||||
|
||||
/**
|
||||
* Gets credentials from Google Auth server
|
||||
* @param clientSecret
|
||||
* @param device_code
|
||||
* @param interval
|
||||
* @param expires_in
|
||||
* @param postAction
|
||||
*/
|
||||
function verifyConnection(
|
||||
clientSecret: ClientSecret,
|
||||
device_code: string,
|
||||
interval: number,
|
||||
expires_in: number,
|
||||
postAction: () => void,
|
||||
postAction: () => Promise<any>,
|
||||
) {
|
||||
// create poller to check for auth
|
||||
pollInterval = setInterval(pollForAuth, interval * 1000);
|
||||
|
||||
Reference in New Issue
Block a user