message de retour à l'envoi du jeton Google
This commit is contained in:
parent
979d577d2a
commit
1cb3a692ef
10 changed files with 74 additions and 18 deletions
|
|
@ -19,6 +19,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using Yavsc.Model.Google;
|
||||
using Yavsc.Model.Calendar;
|
||||
using Yavsc.Helpers;
|
||||
|
|
@ -41,6 +42,7 @@ namespace Yavsc.ApiControllers
|
|||
/// </summary>
|
||||
/// <param name="evpub">Evpub.</param>
|
||||
[Authorize(Roles="BackOffice")]
|
||||
[AcceptVerbs("POST")]
|
||||
public MessageWithPayloadResponse NotifyEvent(EventPub evpub) {
|
||||
return GoogleHelpers.NotifyEvent(evpub);
|
||||
}
|
||||
|
|
@ -50,10 +52,15 @@ namespace Yavsc.ApiControllers
|
|||
/// </summary>
|
||||
/// <param name="registrationId">Registration identifier.</param>
|
||||
[Authorize]
|
||||
public void SetRegistrationId(string registrationId)
|
||||
[AcceptVerbs("GET")]
|
||||
public string SetRegistrationId(string registrationId)
|
||||
{
|
||||
// TODO set registration id
|
||||
setRegistrationId (User.Identity.Name, registrationId);
|
||||
if (string.IsNullOrWhiteSpace(registrationId))
|
||||
return "Registration id cannot be blank";
|
||||
var username = User.Identity.Name;
|
||||
setRegistrationId (username, registrationId);
|
||||
return "Saved registration for user:"+username;
|
||||
}
|
||||
|
||||
private void setRegistrationId(string username, string regid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue