Skip to content

Commit

Permalink
センサーからの喫煙追加はたとえ平均時間での記録が有効でもスキップするようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenta Iwami committed Nov 4, 2018
1 parent 72d0c35 commit 8b955bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -38,7 +38,7 @@ public function store(Request $request)
$new_smoke = new Smoke;
$new_smoke->user_id = $user->id;

if ($user->is_add_average_auto) {
if ($user->is_add_average_auto and !$request->get('is_sensor')) {
$result = $this->get_start_end_time($user->id);
$new_smoke->started_at = $result['start'];
$new_smoke->ended_at = $result['end'];
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Expand Up @@ -151,7 +151,8 @@ method:POST
endpoint:api/v1/smoke
request:
{
"uuid": "hogehoge"
"uuid": "hogehoge",
"is_sensor": true
}
response:
{
Expand Down

0 comments on commit 8b955bb

Please sign in to comment.