exvo_notifications 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,14 +5,22 @@ module ExvoNotifications
|
|
5
5
|
|
6
6
|
def create
|
7
7
|
user = User.find_or_create_by_uid(params[:user_uid])
|
8
|
-
user.
|
9
|
-
|
8
|
+
user.plan = params[:edition_title]
|
9
|
+
if user.save
|
10
|
+
render :json => "Successfully created", :status => 201
|
11
|
+
else
|
12
|
+
render :json => user.errors, :status => :unprocessable_entity
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
def destroy
|
13
17
|
user = User.find_or_create_by_uid(params[:user_uid])
|
14
|
-
user.
|
15
|
-
|
18
|
+
user.plan = nil
|
19
|
+
if user.save
|
20
|
+
render :json => "Successfully removed", :status => 200
|
21
|
+
else
|
22
|
+
render :json => user.errors, :status => :unprocessable_entity
|
23
|
+
end
|
16
24
|
end
|
17
25
|
|
18
26
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exvo_notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 7
|
10
|
+
version: 0.2.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Robert S\xC4\x99k"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-26 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|