Compare commits

...

2 Commits

Author SHA1 Message Date
Bevan Hunt 7228360a4c remove demo from readme 2020-03-18 13:57:18 -07:00
Bevan Hunt 318ed65344 update 2020-03-18 13:56:27 -07:00
4 changed files with 10 additions and 14 deletions

2
Cargo.lock generated
View File

@ -121,7 +121,7 @@ dependencies = [
[[package]]
name = "broker"
version = "4.3.2"
version = "4.3.3"
dependencies = [
"Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bcrypt 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,6 +1,6 @@
[package]
name = "broker"
version = "4.3.2"
version = "4.3.3"
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
edition = "2018"
license = "MIT"

View File

@ -28,10 +28,6 @@ Broker follows an insert-only/publish/subscribe paradigm rather than a REST CRUD
* Event log via GET request
* Event cancellation via GET request
### Demo
[Demo](https://broker.apibill.me/)
### How it works
In Broker you create a user, login, then insert an event with its data, a collection_id, and a timestamp. Broker publishes the event when the timestamp is reached to the event stream via SSE. Broker keeps all events its database that can be viewed in collections (by collection_id). Broker can also cancel future events.

View File

@ -18,7 +18,7 @@ function Insert(props) {
const onSubmit = values => {
const apiEndpoint = process.env.REACT_APP_API + '/insert';
const vals = JSON.stringify(values);
const v = `{"collection_id": "${id}", "event": "demo", "timestamp": ${stamp}, "data": ${vals} }`;
const v = `{"collection_id": "${id}", "event": "covid", "timestamp": ${stamp}, "data": ${vals} }`;
fetch(apiEndpoint, {
method: 'post',
mode: 'cors',
@ -40,8 +40,8 @@ function Insert(props) {
<div class="md:w-2/3">
<input
ref={register}
name="client_name"
placeholder="Client's Full Name"
name="Username"
placeholder="Username"
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-purple-500"
/>
</div>
@ -50,8 +50,8 @@ function Insert(props) {
<div class="md:w-2/3">
<input
ref={register}
name="client_phone_number"
placeholder="Client's Phone #"
name="message"
placeholder="Message"
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-purple-500"
/>
</div>
@ -60,8 +60,8 @@ function Insert(props) {
<div class="md:w-2/3">
<input
ref={register}
name="client_email"
placeholder="Client's Email"
name="location"
placeholder="Location"
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-purple-500"
/>
</div>
@ -93,7 +93,7 @@ function Load(props) {
}
{props.jwt.length > 0 &&
<div class="mt-20 mx-20">
<Grid endpoint={process.env.REACT_APP_API} eventListen={'demo'} title={'Client Info'} token={props.jwt} />
<Grid endpoint={process.env.REACT_APP_API} eventListen={'covid'} title={'Fight Covid'} token={props.jwt} />
</div>
}
</Route>