<commit_before>function putNotice( userId, msg, cb ){
	Notices.create({
		userId: userId,
		msg: msg
	}).then(function(){
		console.log("create notice".cyan);
		if( cb != null ) cb( userId, msg ); // async waterfall 과 쓸때의 범용성을 
	});
}

module.exports = {
	putNotice: putNotice
}<commit_msg>peekNotice 함수 추가<commit_after>function peekNotice( userId, cb ){
	Notice.findAndCountAll({
		where:{
			userId: userId
		}
	}).then(
		cb(result)
	);
}

function putNotice( userId, msg ){
	Notices.create({
		userId: userId,
		msg: msg
	}).then(function(){
		console.log("create notice".cyan);
		if(cb != null) cb(userId, msg);	// async waterfall과 사용할때 범용성을 향상시키기 위함
	});
}

module.exports = {
	peekNotice: peekNotice,
	putNotice: putNotice
}
{'fraction_non_alphanumeric': 0.1573187414500684, 'fraction_numerical': 0.0, 'mean_word_length': 4.083333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6028085', 'n_tokens_mistral': 316, 'n_tokens_neox': 318, 'n_words': 66}