WorkクラスのsetInvitesでanimationを新しくセット出来るようにしました。
1 parent e82cf14 commit 27e035b40b77644bc6ae45cf0c18956d967bc246
h-fuji authored on 25 May 2021
Showing 2 changed files
View
5
src/main/java/org/ntlab/acanthus_server/entities/Work.java
 
import org.ntlab.acanthus_server.models.Gallery;
 
public class Work {
private Gallery animations = Gallery.getInstance();
 
int status = 0;
private Gallery animations = Gallery.getInstance();
Animation animation = null;
 
public Animation getAnimation(){ return this.animation; }
 
public void setAnimation(Animation anime) { this.animation = anime; }
 
public void setInvites(int aid){
Animation animation = animations.getAnimationByAid(aid);
animation = animations.getAnimationByAid(aid);
this.setAnimation(animation);
this.status = 1;
}
 
View
2
■■■
src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java
if (owner != null && owner.getToken().equals(ownerToken)) {
animation.addAccoutToAnimationInvites(aid, ownerUid, invitedUid);
//↓矢印Workのstatusを招待状態にする処理
Account account = accounts.getAccountByUid(Integer.parseInt(invitedUid));
account.getWorkHashMap().get(aid).setInvites();
account.getWorkHashMap().get(aid).setInvites(aid);
return "追加しました";
} else {
throw new WebApplicationException(404);
}