diff --git a/src/main/java/org/ntlab/acanthus_server/resources/accounts/InvitedRest.java b/src/main/java/org/ntlab/acanthus_server/resources/accounts/InvitedRest.java new file mode 100644 index 0000000..a968594 --- /dev/null +++ b/src/main/java/org/ntlab/acanthus_server/resources/accounts/InvitedRest.java @@ -0,0 +1,48 @@ +package org.ntlab.acanthus_server.resources.accounts; + +import org.ntlab.acanthus_server.entities.Animation; +import org.ntlab.acanthus_server.models.Accounts; +import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; +import java.util.Collection; +import java.util.Collections; + +@Component +@Path("/accounts") +public class InvitedRest { + + private Accounts accounts = Accounts.getInstance(); + + /** + *accountごとの招待されている作品の表示 + *トークン認証 + * + */ + @GET + @Produces(MediaType.APPLICATION_JSON) + public Collection getAccountInvited(@PathParam("uid") int uid, @QueryParam("token") String token){ + return null; + } + + /** + * 作品に招待されたときgalleryのinvitesとaccountのinvitedにそれぞれuid,aidを追加する + */ + @PUT + @Produces(MediaType.APPLICATION_JSON) + public void addAccountInvited(@PathParam("uid") int uid, @FormParam("token") String token){ + + } + + /** + * 招待に応じた時 + * それぞれのinviteからuid,aidを削除し、Accountのworkにaid、galleryのeditorsにuidを追加する + * 招待を拒否した時 + * それぞれのinviteからuid,aidを削除する + */ + @DELETE + @Produces(MediaType.APPLICATION_JSON) + public void removeAccountInvited(@PathParam("uid") int uid, @FormParam("token") String token){ + + } +} \ No newline at end of file