Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit

Permalink
Merge pull request #7 from colonelpopcorn/issue/GH-5
Browse files Browse the repository at this point in the history
Add json keys to struct
  • Loading branch information
colonelpopcorn authored Sep 22, 2020
2 parents b126f80 + cac54a1 commit d2ce9bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@
</thead>
<tbody v-if="streams.length > 0">
<tr v-for="stream in streams">
<th scope="row">{{ stream.Id }}</th>
<td>{{ stream.StreamKey }}</td>
<th scope="row">{{ stream.streamId }}</th>
<td>{{ stream.streamKey }}</td>
<td>
<div v-if="stream.IsValid">
<div v-if="stream.isValidStream">
<button
type="button"
class="btn btn-danger"
data-toggle="modal"
data-target="#videoModal"
@click="setStreamValue(stream.StreamKey)"
@click="setStreamValue(stream.streamKey)"
>
LIVE
</button>
Expand All @@ -68,7 +68,7 @@
<button
type="button"
class="btn btn-danger"
@click="deleteStream(stream.Id)"
@click="deleteStream(stream.streamId)"
>
Delete Stream
</button>
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ UPDATE stream_keys SET is_valid = ? WHERE stream_key = ?;
`
// Stream obj
type Stream struct {
Id, IsValid int
StreamKey string
Id int `json:"streamId"`
IsValid int `json:"isValidStream"`
StreamKey string `json:"streamKey"`
}

func main() {
Expand Down

0 comments on commit d2ce9bd

Please sign in to comment.