AccountsRestを修正しました #67

Merged k-shiomura merged 1 commit into nitta-lab-2024:master from nitta-lab-2024:AccountsRest on 9 May
Showing 1 changed file
View
11
src/main/java/org/ntlab/citrusserver/resources/AccountsRest.java
@DELETE
public void deleteAccount(@PathParam("account_id") String accountId,
@QueryParam("token") String token,
@QueryParam("password")String password) {
accountManager.deleteAccount(accountId, token, password);
accountManager.deleteAccount(accountId, password, token);
}
 
 
//指定されたIDのパスワードを変更する (PUT)
@QueryParam("token") String token,
@FormParam("old_password")String oldPassword,
@FormParam("new_password")String newPassword){
accountManager.changePassword(accountId,token,oldPassword,newPassword);
 
}
 
// 指定されたIDの自己紹介を返す(GET)
@Path("/accounts/{account_id}/introduction")
@GET
@Produces(MediaType.APPLICATION_JSON)
public String getIntroduction(@PathParam("account_id") String accountId){ //account_idを渡してintroductionが返ってくる
public String getIntroduction(@PathParam("account_id") String accountId){
String ac = accountManager.AccountIntro(accountId);
return ac;
}
 
// 指定されたIDの自己紹介を変更する (PUT)
@Path("/accounts/{account_id}/introduction")
@PUT
public void changeIntroduction(@PathParam("account_id") String accountId,
@FormParam("token") String token,
@FormParam("introduction")String introduction){ //account_idを渡してManegerから値が返ってくる
@FormParam("token") String token,
@FormParam("introduction")String introduction){
accountManager.changeIntroduction(accountId,token,introduction);
}
/////////
// @Path("/accounts/{account_id}/photo")
// //画像を返す
// @GET
// public String getAccount(@PathParam("account_id") String accountId){ //account_idを渡してManegerから値が返ってくる
// public String getAccount(@PathParam("account_id") String accountId){
// Account ac = accountManager.getAccount(accountId);
// return ac.getPhoto();
// }
//