/// <summary> /// Archives the specified noteid. /// </summary> /// <param name="userid">The userid.</param> /// <param name="noteid">The noteid.</param> /// <returns></returns> /// <exception cref="Exception"></exception> public async Task <bool> Archive(int userid, int noteid, TrashValue archive) { try { if (userid != 0 && noteid != 0) { return(await _notesRepository.Archive(userid, noteid, archive)); } else { return(false); } } catch (Exception e) { throw new Exception(e.Message); } }
/// <summary> /// Pin the specified noteid. /// </summary> /// <param name="userid">The userid.</param> /// <param name="noteid">The noteid.</param> /// <returns></returns> /// <exception cref="Exception"></exception> public async Task <bool> Pinned(int userid, int noteid, TrashValue pin) { try { if (userid != 0 && noteid != 0) { return(await _notesRepository.Pinned(userid, noteid, pin)); } else { return(false); } } catch (Exception e) { throw new Exception(e.Message); } }