ishapi 0.1.8.99 → 0.1.8.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35601fdfce133a3aa267ac5b1a6a27e70367a51364c8f97602a6c6c18defb581
4
- data.tar.gz: 6576d28952685290bda7be04499e721ea3a5822a3ec03587e358da61dd3d1df4
3
+ metadata.gz: 139a1aafab3ecdafbf2f3efd61850a10ad0a8db6da7db30be0f6bd9e9890cf76
4
+ data.tar.gz: f9f2d2e4ca5922afe7c14469dc44b9bde29052dac752474a8a053b13174da3ff
5
5
  SHA512:
6
- metadata.gz: 53cb6fcdc4df6ee593894eb579e5a75c59d384124355e367633480781ab2679dd9d4c643aa0a926bb8a221ee3b2c04226a9569bca3959cc0b9258f1ca87971d0
7
- data.tar.gz: 0e09a517c7a3d40225a6fefa6b122e40ad8175d19cab125f235aa7f853cde43d7da1c0856fc52e43f9acd64513f086bedd62cb16624dfb2327bfa13a0b7d7392
6
+ metadata.gz: 1a4f0bdb79f423805c322fba50500b4742861e4ea0ff3de5a2d203569b33e7bd96f678da5e4edaef6b5a6cd59629945b3c21fa46cf1e4615f4a4b68e56a52c80
7
+ data.tar.gz: '09cfdfb813eccc850a98996765eeef7e43f476b104e111cc79daa549082cda9795925818e0b48fb2cc831cdaf329e02ddd6d2930de0798dfdf66deaaae842c32'
@@ -2,10 +2,17 @@ require_dependency "ishapi/application_controller"
2
2
  module Ishapi
3
3
  class UserProfilesController < ApplicationController
4
4
 
5
+ before_action :check_profile
6
+
5
7
  def show
6
8
  @profile = IshModels::UserProfile.find_by :username => params[:username]
7
9
  authorize! :show, @profile
8
10
  end
9
11
 
12
+ def my
13
+ @profile = current_user.profile
14
+ authorize! :show, @profile
15
+ end
16
+
10
17
  end
11
18
  end
@@ -0,0 +1,13 @@
1
+
2
+ json.name @profile.name
3
+ json.username @profile.username
4
+ json.email @profile.email
5
+
6
+ json.n_reports @profile.reports.count
7
+ json.n_galleries @profile.galleries.count
8
+ json.n_videos @profile.videos.count
9
+
10
+ if @profile.current_city
11
+ json.current_city @profile.current_city
12
+ end
13
+
@@ -25,6 +25,7 @@ Ishapi::Engine.routes.draw do
25
25
  post 'invoices/search', :to => 'invoices#search'
26
26
 
27
27
  get 'my/newsitems', to: 'newsitems#index'
28
+ get 'my/account', to: 'user_profiles#my'
28
29
  namespace :my do
29
30
  post 'reports', :to => 'reports#index'
30
31
  get 'reports', :to => 'reports#index'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ishapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.99
4
+ version: 0.1.8.100
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-23 00:00:00.000000000 Z
11
+ date: 2019-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -260,6 +260,7 @@ files:
260
260
  - app/views/ishapi/tags/_widget.jbuilder
261
261
  - app/views/ishapi/tags/index.jbuilder
262
262
  - app/views/ishapi/tags/show.jbuilder
263
+ - app/views/ishapi/user_profiles/my.jbuilder
263
264
  - app/views/ishapi/user_profiles/show.jbuilder
264
265
  - app/views/ishapi/users/_index.jbuilder
265
266
  - app/views/ishapi/users/show.jbuilder