UNPKG

@tycoonsystems/tycoon-modules

Version:
1 lines 498 B
import{fetchPost}from"@tycoonsystems/tycoon-modules/utility/fetch";import{resolveVariables}from"/app.config";export default async function handler(t){if(t){t=Object.assign(t,{hash:t.user.hash,identifier:t.user.identifier,dontForce:!0}),t=await fetchPost(resolveVariables()?.apiUrl+"/p/checkuserstreamingstatus",null,null,t);if(t&&t.hasOwnProperty("status")){if("disauthenticated"==t.status)return logout(),"disauthenticated";if("failed"==t.status)return!1;if("success"==t.status)return t}}return!1}