Skip to content

Commit

Permalink
no error if didnt find sdk/packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ddxv committed Jan 3, 2025
1 parent 80cf5cd commit e36244e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
4 changes: 2 additions & 2 deletions frontend/src/routes/apps/[id]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ export const load: PageServerLoad = async ({ params, parent }) => {
const app = await myapp();

// Conditionally create myPackageInfo based on sdk_crawl_result
let myPackageInfo = async () => null;
let myPackageInfo = async () => 'No SDK Scan Result';
if (app.sdk_crawl_result > 0) {
myPackageInfo = async () => {
const resp = await fetch(`http://localhost:8000/api/apps/${id}/packageinfo`);
return checkStatus(resp, 'App Package Info');
};
}

let myAdsTxt = async () => null;
let myAdsTxt = async () => 'No AdsTxt Result';
if (app.adstxt_crawl_result === 1) {
myAdsTxt = async () => {
const resp = await fetch(`http://localhost:8000/api/apps/${id}/adstxt`);
Expand Down
16 changes: 0 additions & 16 deletions frontend/src/routes/apps/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -397,22 +397,6 @@
</section>
{/await}
</div>
<!-- <div class="card preset-tonal p-2 md:p-8 mt-2 md:mt-4">
<h4 class="h4 md:h3 p-2">Additional Information</h4>
<div class="px-4 md:px-8">
{#await data.myapp then myapp}
<p>Free: {myapp.free}</p>
<p>Price: {myapp.price}</p>
<p>Size: {myapp.size || 'N/A'}</p>
<p>Minimum Android Version: {myapp.minimum_android || 'N/A'}</p>
<p>Developer Email: {myapp.developer_email || 'N/A'}</p>
<p>Content Rating: {myapp.content_rating || 'N/A'}</p>
<p>Ad Supported: {myapp.ad_supported || 'N/A'}</p>
<p>In-App Purchases: {myapp.in_app_purchases || 'N/A'}</p>
<p>Editor's Choice: {myapp.editors_choice || 'N/A'}</p>
{/await}
</div>
</div> -->
<div class="card preset-tonal p-2 md:p-8 mt-2 md:mt-4">
<h4 class="h4 md:h3 p-2">Ad SDKs, Trackers & Permissions</h4>
{#await data.myPackageInfo}
Expand Down

0 comments on commit e36244e

Please sign in to comment.