Skip to content

Commit

Permalink
refactor: product renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldotyu committed Oct 22, 2023
1 parent 6aaf5d9 commit bcf2639
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/product-service/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async fn add_product(
mut payload: web::Payload,
) -> Result<HttpResponse, Error> {
let mut products = data.products.lock().unwrap();
let new_id = products.len() as i32 + 2;
let new_id = products.len() as i32 + 1;

// payload is a stream of Bytes objects
let mut body = web::BytesMut::new();
Expand Down Expand Up @@ -114,9 +114,9 @@ async fn main() -> std::io::Result<()> {
let products = vec![
Product {
id: 1,
name: "Captain Catnip's Fisherman's Friend".to_string(),
name: "Contoso Catnip's Friend".to_string(),
price: 9.99,
description: "Watch your feline friend embark on a fishing adventure with Captain Catnip's Fisherman's Friend toy. Packed with irresistible catnip and dangling fish lure.".to_string(),
description: "Watch your feline friend embark on a fishing adventure with Contoso Catnip's Friend toy. Packed with irresistible catnip and dangling fish lure.".to_string(),
image: "/placeholder.png".to_string()
},
Product {
Expand Down Expand Up @@ -170,9 +170,9 @@ async fn main() -> std::io::Result<()> {
},
Product {
id: 9,
name: "Captain Claw's Crab Cat Toy".to_string(),
name: "Contoso Claw's Crabby Cat Toy".to_string(),
price: 3.99,
description: "Watch your cat go crazy for Captain Claw's Crab Cat Toy. This crinkly and catnip-filled toy will awaken their hunting instincts and provide endless entertainment.".to_string(),
description: "Watch your cat go crazy for Contoso Claw's Crabby Cat Toy. This crinkly and catnip-filled toy will awaken their hunting instincts and provide endless entertainment.".to_string(),
image: "/placeholder.png".to_string()
},
Product {
Expand Down
7 changes: 3 additions & 4 deletions src/store-admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ This is a Vue.js app that simulates a store admin portal where users can manuall

The app relies on the [product-service](../product-service), [makeline-service](../order-service), and optionally the [ai-service](../ai-service) along with mongodb and rabbitmq instances running. A docker-compose file is provided to make this easy.

To run the necessary services, clone the repo, open a terminal, and navigate to the `store-admin` directory.
To run the necessary services, clone the repo, open a terminal, and navigate to the `store-admin` directory.


If you have access to OpenAI or Azure OpenAI, open the `docker-compose.yml` file, uncomment the `aiservices` block, and add your OpenAI or Azure OpenAI credentials.
If you have access to OpenAI or Azure OpenAI, open the `docker-compose.yml` file, uncomment the `aiservices` block, and add your OpenAI or Azure OpenAI credentials.

> IMPORTANT: When filling in the values, do not put the value in double-quotes.
Expand All @@ -38,7 +37,7 @@ Then run the following command:
docker compose up
```

With the services running, open a new terminal and navigate to the `store-front` directory. Then run the following commands:
With the services running, open a new terminal and navigate to the `store-admin` directory. Then run the following commands:

```bash
export VUE_APP_PRODUCT_SERVICE_URL=http://localhost:3002/
Expand Down
2 changes: 1 addition & 1 deletion src/store-admin/src/components/TopNav.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<nav>
<div class="logo">
<a href="/">Azure Pet Supplies - Admin Portal</a>
<a href="/">Contoso Pet Supplies - Admin Portal</a>
</div>
<button class="hamburger" @click="toggleNav">
<span class="hamburger-icon"></span>
Expand Down
2 changes: 1 addition & 1 deletion src/store-front/src/components/TopNav.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<nav>
<div class="logo">
<a href="/">Azure Pet Supplies</a>
<a href="/">Contoso Pet Supplies</a>
</div>
<button class="hamburger" @click="toggleNav">
<span class="hamburger-icon"></span>
Expand Down

0 comments on commit bcf2639

Please sign in to comment.