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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 139a1aafab3ecdafbf2f3efd61850a10ad0a8db6da7db30be0f6bd9e9890cf76
|
4
|
+
data.tar.gz: f9f2d2e4ca5922afe7c14469dc44b9bde29052dac752474a8a053b13174da3ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
|
data/config/routes.rb
CHANGED
@@ -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.
|
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-
|
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
|