Skip to content

Commit

Permalink
Merge pull request #14 from joswayski/noads
Browse files Browse the repository at this point in the history
Added ads to healthcheck
  • Loading branch information
joswayski authored Jul 9, 2024
2 parents 2503dda + 5f30e87 commit 785b70f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
14 changes: 12 additions & 2 deletions services/api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,23 @@ async fn root() -> &'static str {
"Are you an idiot? Did you forget to look at the docs?"
}

// k8s
#[derive(Serialize)]
struct HealthResponse {
message: String,
brought_to_you_by: String,
}

async fn health() -> &'static str {
"Yeah"
}

async fn health2() -> Response {
(StatusCode::OK, "yea").into_response()
let res = HealthResponse {
message: "Yeah".to_string(),
brought_to_you_by: get_random_ad(),
};

(StatusCode::OK, Json(res)).into_response()
}
#[derive(Serialize)]
struct InsertItemResponse {
Expand Down
1 change: 1 addition & 0 deletions services/web/app/components/pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const tiers = [
"Indexes available as a paid addon ($100/index/mo)",
"Employee pinky promise to not look at customer data to retaliate over a personal grievance",
"Bring Your Own API Key™ - use your own generated key to access our API",
"No Ads in responses",
"Backups",
],
featured: true,
Expand Down
5 changes: 3 additions & 2 deletions services/web/app/routes/docs._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const faqs = [
color: "bg-emerald-500",
endpoint: "/u-up",
text: <p>Will give you a response of:</p>,
response: `"yea"`,
response: `{"message": "Yeah", "brought_to_you_by": "Pantene: Treat your hair with Pantene's new nourishing shampoo."}`,
},
{
id: 2,
Expand Down Expand Up @@ -80,7 +80,8 @@ export default function Example() {
<div className="ml-3 flex-1 md:flex md:justify-between">
<p className="text-sm text-blue-700">
Enterprise customers can bring their own API keys! Simply
insert any items with whatever key that you want prefixed with <span className='font-bold'>enterprise-</span>
insert any items with whatever key that you want prefixed with{" "}
<span className="font-bold">enterprise-</span>
</p>
</div>
</div>
Expand Down

0 comments on commit 785b70f

Please sign in to comment.