added apps
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
"use server";
|
||||
import { fetchDataWithToken, fetchData } from "../api-fetcher";
|
||||
import { fetchDataWithToken } from "../api-fetcher";
|
||||
import { baseUrlAuth, tokenSecret } from "../basics";
|
||||
import { cookies } from "next/headers";
|
||||
|
||||
import NextCrypto from "next-crypto";
|
||||
|
||||
const checkToken = `${baseUrlAuth}/authentication/token/check`;
|
||||
const pageValid = `${baseUrlAuth}/authentication/page/valid`;
|
||||
const siteUrls = `${baseUrlAuth}/authentication/sites/list`;
|
||||
@@ -18,11 +19,13 @@ async function checkAccessTokenIsValid() {
|
||||
async function retrievePageList() {
|
||||
const response = await fetchDataWithToken(siteUrls, {}, "GET", false);
|
||||
return response?.status === 200 || response?.status === 202
|
||||
? response.data?.site_urls
|
||||
? response.data?.sites
|
||||
: null;
|
||||
}
|
||||
|
||||
|
||||
async function retrievePagebyUrl(pageUrl: string) {
|
||||
|
||||
const response = await fetchDataWithToken(
|
||||
pageValid,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user