Package models

Examples of models.InboxMessage.update()


    InboxMessage message = InboxMessage.getReceived(id, current);
    if(message==null) notFound();
    //if(message.owner.id.longValue() != current.id.longValue()) forbidden();
    if(!message.readed) {
      message.readed = Boolean.TRUE;
      message.update();
    }
    renderTemplate("api/message.json",message);
  }
 
  public static void delete(Long id) {
View Full Code Here


    if(message==null) notFound();
    //if(message.id != msgJSON.id) notFound();
    //if(message.to.id.longValue() != current.id.longValue()) forbidden();
    // Copy updateable properties from the JSON object to the original.
    message.readed = body.get("readed").getAsBoolean();
    message.update();
    response.status = StatusCode.OK;
    Map map = new HashMap();
    map.put("id", message.id);
    String url = Router.reverse("api.Subscribers.get", map).url;// GET /clients/1541
    response.setHeader("location", url);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.